POV-Ray : Newsgroups : povray.general : Domain error in pow : Re: Domain error in pow Server Time
10 Aug 2024 15:25:05 EDT (-0400)
  Re: Domain error in pow  
From: Jerome M  BERGER
Date: 1 Dec 1999 18:44:11
Message: <3845B2A3.55F76FA@enst.fr>
Alf Peake wrote:
> 
> /* Re my earlier post _Pinching points_ and responses by Chris Colefax and
> Bill DeWitt:
> I get a non-fatal "Domain error in pow" each pass through the loop below if
> in pow(A,B) B is not an integer and I use the D2 section. Both sections
> should be the same and do evaluate the same. Is there a mistake in my script
> that I'm missing? The docs say pow(float,float).
	Yes but if the second number is not an integer, the first one must be
greater than 0...
	The way I see it:
* in the first example, PoV only evaluates the right #declare and the
test ensures that the value is correct;
* in the second example, PoV evaluates both values (or tries to) and
then chooses according to the result of the test, which generates an
error since one of the values is incorrect...

		Jerome

Disclaimer: I haven't looked at PoV's source and I don't really know
what I'm talking about, but this scenario is coherent with what you
describe...

-- 
*******************************

* they'll tell you what can't * mailto:ber### [at] inamecom
* be done and why...          * http://www.enst.fr/~jberger
* Then do it.                 *
*******************************


Post a reply to this message

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