If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > Double Data Type

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-19-03, 12:33
Splitfyre Splitfyre is offline
Registered User
 
Join Date: Jul 2003
Location: Canada
Posts: 27
Double Data Type

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?
Reply With Quote
  #2 (permalink)  
Old 09-21-03, 08:03
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,026
Re: Double Data Type

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:
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On