Andrew Brunner schrieb:
It doesn't make sense to display more digits than stored in the binary
variable. There is no loss, only rounding errors in the conversion from
binary to decimal text.
I need to compare values with complete precision. I don't think this
problem was present a while ago.
Floating point numbers never should be compared for equality. Better:
if abs(a-b) < delta then ...
with delta corresponding to the available accuracy (e.g. 1E-15).
As a rule of thumb: 10^3 ~ 2^10, i.e. 3 decimal digits require 10 bits
in the significand, so that 52 bits allow for 52*3/10 ~ 15 digits.
When the memory is copied is there a missing 12bits? Is there going
to be a fix for this?
The binary value consists of an exponent and an significand (mantissa),
most probably you forgot to count the exponent and sign bits.
I'd suggest that you read a bit about using floating point numbers. They
never are accurate, and every decimal representation adds more
inaccuracy :-(
DoDi
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel