News for hackers. Stuff that matters.
Re:PHP 5.3.3 hangs on numeric value 2.2250738585072011e-308 by astrange on Tuesday January 04, 2011 @06:42AM (#2066615)
A better fix would be to use "-mfpmath=sse" to disable x87 math - this also makes your program slightly faster, whereas -ffloat-store can make it much slower.
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.
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.
Re:PHP 5.3.3 hangs on numeric value 2.2250738585072011e-308 by lifthrasiir on Tuesday January 04, 2011 @06:46AM (#2066622)
Ah, your point is correct. In my defense, I was just tried to be conservative.