-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Duncan Sands wrote: | On Mon, 2005-03-07 at 10:51 -0500, Robert Dewar wrote: | |>Paolo Carlini wrote: |> |>>Andrew Haley wrote: |>> |>> |>>>F9.4.4 requires pow (x, 0) to return 1 for any x, even NaN. |>>> |>>> |>> |>>Indeed. My point, basically, is that consistency appear to require the |>>very same behavior for *complex* zero^zero. |> |>I am not sure, it looks like the standard is deliberately vague here, |>and is not requiring this result. | | | Mathematically speaking zero^zero is undefined, so it should be NaN. | This already clear for real numbers: consider x^0 where x decreases | to zero. This is always 1, so you could deduce that 0^0 should be 1. | However, consider 0^x where x decreases to zero. This is always 0, so | you could deduce that 0^0 should be 0. In fact the limit of x^y | where x and y decrease to 0 does not exist, even if you exclude the | degenerate cases where x=0 or y=0. This is why there is no reasonable | mathematical value for 0^0. |
That is true.
However, on the other hand, however the standard says looks to me to say 0^0=1. Also printf("%f",pow(0.0,0.0)) returns 1.0 on both VC++6 and g++ 3.3 (just what I happen to have lying around..)
I would agree with Paolo that the most imporant point is arguably consistency, and it looks like that is pow(0.0,0.0)=1
Chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCLH5w3FpDzErifpIRAnD9AJ9l7UCtrifXS+EuC70CaIE6oE7QzQCfbWO9 RwBroPYweiQx7cDWodYjB5k= =nrh7 -----END PGP SIGNATURE-----