Problem with FieldAsFloat

cbrandes

Member
Hello,

I have a problem with the TOracleQuery.FieldAsFloat Function. In the database the field has the value 0.04. By using this function the variable has the value 0.039999999106. The program is running on Windows98. Can someone help me (probably it is problem of Delphi ?!?)

TIA
Carsten
 
It might be a floating point precision issue, though I would have expected more than the 8 digits precision in your example. A Double has 15 digits precision.

------------------
Marco Kalter
Allround Automations
 
Originally posted by mkalter:
It might be a floating point precision issue, though I would have expected more than the 8 digits precision in your example. A Double has 15 digits precision.

 
Originally posted by mkalter:
It might be a floating point precision issue, though I would have expected more than the 8 digits precision in your example. A Double has 15 digits precision.


Oh sorry, seems to be that I pressed Return too fast, so that just a quoted message is now in the thread ...

mmh, don't ask me why I used a Single ?!? And that I bother you with such a question. It's now working..

Nevertheless, thanks for your help
Carsten
 
Back
Top