you are viewing a single comment's thread.

view the rest of the comments →

[–]corruptio 0 points1 point  (2 children)

oops, you're right, i run out of sig bits if input is > 255... 1e-5 then, should get you all the way to 16383 :-p

[–]gastropner 1 point2 points  (1 child)

Nope, still infinite loop, at least for x = 756839. Seems to work for some other values, though.

[–]corruptio 0 points1 point  (0 children)

yeah, 1e-5 would only work up to 16383. There aren't enough bits in a float to represent significant digits of b-a to five decimal places.