POV-Ray : Newsgroups : povray.binaries.images : Megpov: how to do a superelipse? Do we need x^p=sign(x)*|x|^p? : Re: Megpov: how to do a superelipse? Do we need x^p=sign(x)*|x|^p? Server Time
19 Aug 2024 06:22:04 EDT (-0400)
  Re: Megpov: how to do a superelipse? Do we need x^p=sign(x)*|x|^p?  
From: Tor Olav Kristensen
Date: 4 Jan 2001 19:46:24
Message: <3A551904.B668FF96@online.no>
"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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.