# Re: IEEE 754 support and implications

From: John Hurley <hurleyjohnb_at_yahoo.com>
Date: Mon, 22 Aug 2011 07:40:13 -0700 (PDT)

On Aug 21, 8:47 pm, Richard <richard.ran..._at_ieee.org> wrote:
> IEEE Standard 754 floating point is the most common representation in
> use today for real numbers on computers, including Intel-based PC's,
> Macintoshes, and most Unix platforms. This is binary, unlike the other
> oracle datatypes. Math with this type is much faster. Use with the
> type in C, Java, Ada, etc. requires no conversion from Oracle. It's
> stored like this:
>
> A number of this format consists of a sign bit, an exponent and a
> mantissa. The mantissa consists of the value an implicit leading bit,
> a binary point and then the value of the faction bits (ƒ) and thus 1.ƒ
>
>                              Sign    Exponent     Fraction     Bias
>
> Single Precision    1 [31]      8 [30-23]    23 [22-00]    127
> Double Precision   1 [63]    11 [62-52]    52 [51-00]    1023
>
> Single precision is 32-bits. Double is 64 bits. Bit 1 is the sign. The
> exponent is length[bits]. The fraction is length[bits]. Since the
> exponent can be + or -, the bias is added to the actual exponent to
> get the stored exponent. Thus for single precision, a stored exponent
> of 127 means an exponent of zero and a stored exponent of 200 equals
> an exponent of 73.
>
> An exponent field of all zeros and a fraction field of all zeros
> denotes a value of zero, if the exponent field is all 1's and the
> fraction field is all 0's, value is infinity. Because of the sign bit,
> both can be + or -.
>
> If an exponent field of all 0's but the faction field is non-zero then
> value is a denormalized number. In this case the leading bit before
> the binary point is not assumed to be 1.
>
> An exponent of all 1's and a non-zero fraction is Not a Number (NaN).
> There are two kinds of Nan:
>
> QNaN in which the most significant fraction bit is set and SNaN in
> which the most significant fraction bit is clear. A QNaN (or Quiet
> NaN) propogates freely through arithmetic operations and are the
> result of operations where the result is undefined (indeterminate).
> SNaN denotes the results of invalid operaations.Only the latter throw
> exceptions.
>
> On Aug 20, 5:33 pm, John Hurley <hurleyjo..._at_yahoo.com> wrote:
>
>
>
>
>
>
>
> > Richard:
>
> > # I would like to know more about the purpose, use and misuse of these
> > datatypes.
>
> > ...
>
> > Most of the Oracle world or at least the part that I have seen uses
> > NUMBER in some manner for tables.
>
> > Probably the other ones were put in for standards compatibility.
>
> > Have you tried searching for stuff related to this at asktom?

What does that have to do with the pretty well established idea that people use the Oracle NUMBER datatype most of the time? Received on Mon Aug 22 2011 - 09:40:13 CDT

Original text of this message