http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57749

--- Comment #9 from Vittorio Zecca <zeccav at gmail dot com> ---
Yes, I agree that there is a bug, and IMO it is in cpow/cpowf/cpowl.
With -ffpe-trap=invalid,zero,
as I wrote earlier, complex zero**I where I is integer equal to one,
does not raise
any exception and delivers the expected (by me) result, zero.
Complex zero**X where X is real equal to one raises exception.
Complex zero**C where C is complex equal to (1e0,0e0) raises exception.
This is because glibc computes x**y as exp(y*log(x)) so it fails when x=0,
but IMO it should not compute log(x) if x=0 and y>0 (y real),
it should take a shortcut instead and deliver complex zero.

Reply via email to