Re:PHP 5.3.3 hangs on numeric value 2.2250738585072011e-308
by lallysingh on Tuesday January 04, 2011 @10:33AM
(#2067258)
.. or not use an algorithm that depends on the hardware implementation of floating point math? How about just comparing the previous & current iteration values? If you're not making any progress, you're done.
[ Parent
| on HN ]
Re:PHP 5.3.3 hangs on numeric value 2.2250738585072011e-308
by sausagefeet on Tuesday January 04, 2011 @11:31AM
(#2067489)
You'd probably want to compare to an epsilon AND exact compare, otherwise you could oscillate between two values.