On 2010-09-02 00:49, Paul Johnson wrote:

When you want to compare floating point numbers, check that their
difference is less than some appropriately small delta:

$delta = 1e-8;

if (abs($a - $b)<  $delta)  # numbers are "equal"

Why call it delta when you can call it epsilon?
;)

It also has no 'my', why is that?


And OP should read at least one of these:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
http://en.wikipedia.org/wiki/Floating_point
http://hal.archives-ouvertes.fr/docs/00/28/14/29/PDF/floating-point-article.pdf

--
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