> So you're saying that Deplhi produces a non-standard result? :P
> 

No, but interestingly, depending on which type I declare, I get different
results...

If I declare the types of the vars as Double, then I get a rounding error.
If I choose extended (much greater accuracy than the processor manages by
itself), I get 0. So, from this, it would appear that Delphi is defaulting
its types to something that bypasses the hardware and uses its own libraries
to calculate. If I use a type that maps to a hardware type then the error is
there... I agree that this is a hardware issue. 

Even if I multiply the result by a very large number, with Extended, Comp
and Currency I still get 0. With single, double, and real48 I get rounding
issues.

Delphi 7 types.

Type            Min                             Max
Precision       Size in bytes
Real48  2.9 x 10^-39            1.7 x 10^38                     11-12
6
Single  1.5 x 10^-45            3.4 x 10^38                     7-8
4
Double  5.0 x 10^-324           1.7 x 10^308            15-16           8
Extended        3.6 x 10^-4951          1.1 x 10^4932           19-20
10
Comp            -2^63+1                 2^63 -1                 19-20
8
Currency        -922337203685477.5808   922337203685477.5807    19-20
8

Paul


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226326
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to