Octavian Râşniţă wrote:
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.
But yes, it is not just a fault of perl.
Since all the languages use the same math co-processor, they all get it
wrong. The only question is when they tell you about it. That is, at
what degree of precision do they round off? For Perl, this is a low
number but you can use sprintf() to round off at a higher level.
See `perldoc perlfaq4` and search for /Does Perl have a round\(\)
function\?/
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
Regardless of how small the crowd is, there is always one in
it who has to find out the hard way that the laws of physics
applies to them too.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/