pow() corner cases in odd base floating-point
@spun_off The problem is expecting 1.0/3.0 to produce a different value than it does, not pow.
-
-
@spun_off Users of fp do need to be aware that 1/3 has no representation; pow(x,1.0/3.0) being different from cbrt(x) just follows.
-
@RichFelker @spun_off Yeah, pow(-1, LONG_MAX) works but gives 1 on my machine:-) -
@ch3root @spun_off That's also not a special case of pow; it's failure to recognize that (64-bit) LONG_MAX is not representable in double. -
@RichFelker yes we could use a better type for second argument of that specialized version of pow :)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.