__builtin_cpow((0,0),(0,0))
Paolo Carlini
pcarlini@suse.de
Mon Mar 7 15:41:00 GMT 2005
Robert Dewar wrote:
> 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...
>>
>> Paolo.
>
> Well it certainly seems the right result in this case to me. Does the
> standard really require the wrong result here?
You mean (nan, nan) is ok? Why, exactly? Isn't (1,0) more consistent
with the behavior of real power? (*) The standard is rather vague, in my
reading, allowing "spurious exceptions" in "special cases", thus
allowing a plain cexp(c*clog(z)).
Paolo.
(*) This "intuition" is confirmed by a range of independent
"appliances", like high quality HP calculators or Maple...
More information about the Libstdc++
mailing list