Octavian Râşniţă wrote:
Dr.Ruud:
Octavian Rasnita:

print 0.79 - 0.798;

-0.00800000000000001

which is obviously wrong.

And it is obvious to me that you are wrong. Funny hey?

Sorry but the calculation is obviously wrong. It is not my fault that the computers can't make a perfect float calculation with an infinite number of digits.

To me that means that you "don't get it" yet.

This is about the road from revolting to surprising to understanding.
Next steps can be embracing and abusing, but that is just back to uncomfortable. :)

This is also about presentation and implied error (or resolution).
Do 0.79 and 0.790 always mean the same?
When is it meaningful to write them differently?
When is 1 cm not the same as 10 mm?

It is also about value types and comparison.
For example: context and requirements together define how one should compare a date value to a date-time value.

--
Ruud

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to