"Greg M. Johnson" wrote:
>
> Chris Huff wrote:
>
> > Uh, I think "x^n = pow(x, n)" is more likely...
>
> And is that undefined for negative x and noninteger n?
My HP-48 says this:
-2.5^1.2 = -2.42932519862 - i*1.76500807116
(I.e.: That the result is a complex number.)
And in "The C Library Reference Guide"
http://www.xs4all.nl/~pvl/c/
I found this page:
http://www.xs4all.nl/~pvl/c/2.7.html#pow
(It describes briefly the functions in C's math.h)
It says this about the range of pow()
x cannot be negative if y is a fractional value.
x cannot be zero if y is less than or equal to zero.
And then I found this page:
http://www.informatik.uni-hamburg.de/RZ/software/gnu/libraries/libc_13.html#SEC255
that also mentions the range for the arguments of pow()
(in glibc GNU C library)
Index page here:
http://www.informatik.uni-hamburg.de/RZ/software/gnu/libraries/libc_toc.html
But I don't know how correct the above pages are
and if POV uses C's pow function.
Regards,
Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|