[OT] __builtin_cpow((0,0),(0,0))
Robert Dewar
dewar@adacore.com
Tue Mar 8 13:02:00 GMT 2005
Paolo Carlini wrote:
> Duncan Sands wrote:
>
>> aren't __builtin_cpow and friends language independent? I mean, if a
>> front-end sees a x^y then presumably it ends up being turned into a
>> call to a __builtin_?pow by the back-end. If so, then conforming to
>> the C99 and C++ standards isn't enough: the standards for all gcc
>> supported languages need to be checked.
>>
> This is a good question, indeed. I don't think Ada, for instance, is using
> __builtin_cpow internally, or cpow, for that matter, since many widespread
> libc implementations have cpow(0,0) returning (nan, nan) contra the Ada
> RM, as mentioned by Robert Dewar.
>
> Paolo.
Well if you tell me there are people about there implementing cpow
with log and exp, that's enough for me to decide that Ada should
continue to stay away (the Ada RM has accuracy requirements that
would preclude a broken implementation of this kind) :-)
More information about the Gcc
mailing list