
19 May
2021
19 May
'21
3:39 p.m.
On Wed, May 19, 2021 at 02:08:06PM -0300, Fabrício Olivetti de França wrote:
I guess he expects (-2)**(-2) = 1/4.
But defined this way, (**) would be rather discontinuous
Indeed, that's what I was expecting. For Float and Double (-2)**(-2) = 1/4, but for the interval arithmetic library that uses the default implementation, it doesn't.
This shows the difference between the math library's pow(x, y) and exp(log(x)*y) Indeed pow(x, y) appears to attempt to detect integer-valued floating point exponents and take the interger-exponent code path in that case. -- Viktor.