off topic thoughts: > (twice 1.15 will likely be a bit or two different than 3.30). As Fortran > geeks have known for over half a century, a better way to code this is: > > if (abs(a-b) < n*epsilon*a) > > where 'epsilon' is the hardware constant defining the smallest number such > that 1+a is different from 1, and 'n' controls how many significant digits > we require in the test.
Hm... assume a = b = -1.0 abs(a-b) is zero or maybe a little bit above n*epsilon*a is negative (n>0, epsilon>0, a=-1) Test fails :-( Just my $0.02 Ciao Marcus -- Hail Eris! Hail Discordia! _______________________________________________ Full-Disclosure - We believe in it. Charter: http://lists.grok.org.uk/full-disclosure-charter.html Hosted and sponsored by Secunia - http://secunia.com/
