This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __builtin_cpow((0,0),(0,0))


Robert Dewar writes:
 > Paolo Carlini wrote:
 > 
 > > Actually, sorry, __builtin_cpow returns (nan, nan) (got
 > > sidetracked by a strange issue I'm seeing in the C++ library),
 > > even "worse", so to speak...
 > 
 > Well it certainly seems the right result in this case to me. Does
 > the standard really require the wrong result here?

F9.4.4 requires pow (x, 0) to return 1 for any x, even NaN.

The controversy about what 0^0 really should be is very old, and
apparently was the subject of a long flame war in the Nineteenth
century...

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]