Hi all,

>> Floating point data types are stored in an IEEE 754 binary format that
>> comprises sign, exponent and mantissa.  Precision is dynamic,
>> corresponding to the physical storage format of the value, which may
>> be up to 4 bytes for the FLOAT type and up to 8 bytes for DOUBLE
>> PRECISION.
>
> It's exactly either 4 or 8 bytes, not "up to".

The storage used is 4 or 8 bytes, but the precision is less, because a 
number of bits are used for sign and exponent.

FLOAT precision is 24 bits - roughly 7 decimal digits.
The binary exponent's range is -126..127, which - again, roughly - 
corresponds to -38..38 base 10.

DOUBLE precision is 53 bits (around 16 decimal digits) and the exponent 
ranges from -1022 to 1023 binary or roughly -308 to 308 decimal.

The precision is not dynamic (except when precision is lost because the 
number is too small to be normalized, but I think that's outside the 
scope of an SQL reference).

Cheers,
Paul


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs

Reply via email to