operation with float point.
confirm using anything like this
? e / 1.00000000000000000000000000000000000000
possible workaround on operation and/or result
e := val(str(e,2))
May be you have same problem using double on mysql, but not on currency or decimal.
José M. C. Quintas
--
You received this message because you are subscribed to the Google Groups "Harbour Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-deve...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-devel/f88c1ee2-efa3-4973-9f33-1b5457dc70fcn%40googlegroups.com.
--
31 lip 2025 06:55:13 Jose Carlos da Rocha Rocha <5vol...@gmail.com>:
To view this discussion visit https://groups.google.com/d/msgid/harbour-devel/b074199a-1dde-4151-b084-fb60bf4f7033n%40googlegroups.com.
Hi
Numbers are stored as floating point (double, float) in Harbour (and Clippre) but these issues affect all languages that use them. You will find many many articles explaining the problem. Rounding is all you can do.
All programmers should know this but I managed to get a computer
science degree without being made aware of it :)
--
Regards
Alex
AEval( a, { | i | e := Val(Str( e + i, 15,2)) }
or at the end
e := Val( Str( e, 15, 2 ))
On this way, you do not need extra functions.José M. C. Quintas
To view this discussion visit https://groups.google.com/d/msgid/harbour-devel/60f51347-b2bc-488b-bd4a-1de25df0856bn%40googlegroups.com.