PDA

View Full Version : Double Data Type


Splitfyre
09-19-03, 13:33
My question is a 2 parter:

1. What is the Double Data type for Pervasive?
2. How does it differ from the other numeric fields?
3. Is there another similar data type that will offer similar functionality?

mirtheil
09-21-03, 09:03
Are you using Btrieve or ODBC? THe 8 byte FLOAT data type is the Btrieve mapping of the ODBC Double type. Here is the definition from the Pervasive manual:
Caution
Precision beyond that supported by the C-language definitions for the FLOAT (4-byte) or DOUBLE (8-byte) data type will be lost. If you require precision to many decimal points, consider using the DECIMAL type.
--------------------------------------------------------------------------------

The FLOAT key type is consistent with the IEEE standard for single and double-precision real numbers. The internal format for a 4-byte FLOAT consists of a 23-bit mantissa, an 8-bit exponent biased by 127, and a sign bit, as follows:

A FLOAT key with 8 bytes has a 52-bit mantissa, an 11-bit exponent biased by 1023, and a sign bit. The internal format is as follows: