Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bugs with literal double-precision floating-point number
Message
 
 
To
24/11/2003 09:31:01
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00852922
Message ID:
00852950
Views:
13
Fabio,

>I check VFP double-precision floating-point numbers (dpfpn) with SQL Server.

It's probably worth your reading the SQL help topic:

mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\tsqlref.chm::/ts_fa-fz_6r3g.htm

To find this text:

float and real

Approximate number data types for use with floating point numeric data. Floating point data is approximate; not all values in the data type range can be precisely represented.

Please note the words I've highlighted. And then the table lists 15 digits as the maximum precision.

VFP's double would appear to use a slightly different sign/mantissa/exponent storage because the range of VFP double is not the exact same as SQL.

VFP = +/-4.94065645841247E-324 to +/-8.9884656743115E307 - please note that these examples use 15 digits of precision.
SQL = - 1.79E + 308 through 1.79E + 308

>I expected one full correspondence between the two environments.

Since they aren't the same tool you should adjust your expectation. Floating point representation is typically the biggest place where laguages differ from one another.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform