Mail Archives: djgpp/1998/04/29/07:52:57
Hi you all and K.B. Williams,
I am using Djgpp in this days I had complete a graphical program witch
used the function pow(x,y).
I got always floating point exception, first I didn't know what the
problem was, but later I discovered the pow(0,0) is not number that is
uncountable. Try it on a calculator You will see!
So, don't want to try to compute it. This a math rule as I discovered.
Somehow you can trap this exception.
Alex.
>The program is actually trying to compute pow(0,0). Where the number 1023
>comes from is a mystery.
>
>pow(0,0) = NaN
>
>Note that the call to pow() had to be surrounded by calls to _fpreset()
>to prevent an abort printout like this:
>
>Calculating 0^0 should produce 1.
>
>K.B. Williams
- Raw text -