This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re:[OT] __builtin_cpow((0,0),(0,0))
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 opinion as well (sorry), I'm
personally of the opinion that you can define 0^0 to be whatever you
like. Define it to be 0,1 or 27. Also feel free to define 1^1 to be
whatever you like as well, make it 400 if you like.
Maths is much less written in stone than a lot of people think. However,
the main argument here is which definition of 0^0 would be most useful.
One of the most important things I think personally is that I usually
consider floating point arithmetic to be closely linked to range
arithmetic. For this reason it is very important that the various
functions in volved are continus, as you hope that a small permutation
of the input values will lead to a small permutation of the output
values, else error will grow too quickly.
Any definition of 0^0 will break this condition, as there are places
where you can approach it and be equal 0, and places where you can
approach it and be equal 1. Therefore it is probably best to leave it
undefined.
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).
Chris
- References:
- __builtin_cpow((0,0),(0,0))
- Re: __builtin_cpow((0,0),(0,0))
- Re: __builtin_cpow((0,0),(0,0))
- Re: __builtin_cpow((0,0),(0,0))
- Re: __builtin_cpow((0,0),(0,0))
- Re: __builtin_cpow((0,0),(0,0))
- Re: __builtin_cpow((0,0),(0,0))
- Re: __builtin_cpow((0,0),(0,0))