
14 Aug
2011
14 Aug
'11
11:03 a.m.
The fourth argument should be an integer specifying the number of bits of precision you want (not a float-tolerance). This seems to work: http://codepad.org/Myd5Th7W I get: x=4 f=-2.61457 x=3.42864 f=-3.28835
Correct, the final argument is an integer - the number of bits precision - so your code was asking for 0 bits precision which is why it just returned the starting value! BTW your compiler should have warned about the conversion from double to int, which is a big hint that something is wrong ;-) HTH, John.