POV-Ray : Newsgroups : povray.beta-test : Raising Negative Numbers to a Power : Raising Negative Numbers to a Power Server Time
4 Nov 2024 14:14:03 EST (-0500)
  Raising Negative Numbers to a Power  
From: Josh Seagoe
Date: 1 Oct 2001 20:51:22
Message: <3BB91008.3080505@smileyface.com>
Ok, more specific about what I posted about SuperTorus...

This:
#declare K=function(v,p) { (v^p)^(1/p) }

#debug concat(str(K(1,3), 2, 4), "\n")
#debug concat(str(K(.1,3), 2, 4), "\n")
#debug concat(str(K(-1,3), 2, 4), "\n")
#debug concat(str(K(-.1,3), 2, 4), "\n")


Prints this:
1
.1
-1.#IND
-1.#IND

Instead of the expected:
1
.1
-1
-.1

Even powers & their reciprocals work, anything else doesn't.

(v3.5 beta4, Win2k, PIII)

-josh


Post a reply to this message

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