Re: [OT] __builtin_cpow((0,0),(0,0))

2005-03-10 Thread Geert Bosch
On Mar 9, 2005, at 03:18, Duncan Sands wrote: if the Ada front-end has an efficient, accurate implementation of x^y, wouldn't it make sense to move it to the back-end (__builtin_pow) so everyone can benefit? Does not have it yet. Current implementation is reasonably accurate, but not very fast. How

Re: [OT] __builtin_cpow((0,0),(0,0))

2005-03-09 Thread Robert Dewar
Duncan Sands wrote: if the Ada front-end has an efficient, accurate implementation of x^y, wouldn't it make sense to move it to the back-end (__builtin_pow) so everyone can benefit? I don't know how efficient or accurate the current implementation is (we are in the process of redoing our math routi

Re: [OT] __builtin_cpow((0,0),(0,0))

2005-03-09 Thread Duncan Sands
Hi Robert, > >>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) :-) > > > > > > the

Re: [OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Paul Schlie
> Ronny Peine > > Maybe i found something: > > http://www.cs.berkeley.edu/~wkahan/ieee754status/ieee754.ps > page 9 says: > > "A number of real expressions are sometimes implemented as INVALID > by mistake, or declared Undefined by illconsidered > language standards; a few examples are ... > 0.0**

Re: [OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Robert Dewar
Duncan Sands wrote: Hi Robert, 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) :-) the referenc

Re: [OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Duncan Sands
Hi Robert, > 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) :-) the reference manual all

Re: [OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Robert Dewar
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 standar

Re: [OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Paolo Carlini
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 suppor

Re: [OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Duncan Sands
Hi Paolo, > > What we are debating here isn't really maths at all, just the > > definition which will be most useful and least suprising (and perhaps > > also what various standards tell us to use). > > Also, since we are definitely striving to consistently implement the > current C99 and C++

Re: [OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Ronny Peine
Well, you are right, this discussion becomes a bit off topic. I think 0^0 should be 1 in the complex case, too. Otherwise the complex and real definitions would collide. Example: use complex number 0+i*0 then this should be handled equivalent to the real number 0. Otherwise the programmer would get

Re: [OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Paolo Carlini
Chris Jefferson wrote: What we are debating here isn't really maths at all, just the definition which will be most useful and least suprising (and perhaps also what various standards tell us to use). Also, since we are definitely striving to consistently implement the current C99 and C++ Standar

Re:[OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Chris Jefferson
Ronny Peine wrote: Well, i'm studying mathematics and as i know so far 0^0 is always 1 (for real and complex numbers) and well defined even in numerical and theoretical mathematics. Could you point me to some publications which say other things? cu, Ronny Just wanting to put in my mathematical

Re:[OT] __builtin_cpow((0,0),(0,0))

2005-03-08 Thread Chris Jefferson
Ronny Peine wrote: Well, i'm studying mathematics and as i know so far 0^0 is always 1 (for real and complex numbers) and well defined even in numerical and theoretical mathematics. Could you point me to some publications which say other things? cu, Ronny Just wanting to put in my mathematical