POV-Ray : Newsgroups : povray.general : nan (not a number) : Re: nan (not a number) Server Time
28 Jun 2024 01:43:31 EDT (-0400)
  Re: nan (not a number)  
From: Daniele Varrazzo
Date: 16 Apr 1999 04:15:00
Message: <3716e374.0@news.povray.org>
>  I think that's because it's system dependant. Recognizing NaN-values
>would make it non-portable.
I know it... i don't want an IsNan: i'd like that vnormalize(<0,0,0>) should
always return an error, just like sqrt(-1). So it should 1/0 or 0/0 (that
are two very different things).

I know that nan is compiler-dependant. That's why none of the compiler
should admit it!

All the system such as #if (vV=<0,0,0>) are all nice systems to avoid
troubles... but are SLOW because a POV-Ray scene is not a compiled and
optimized language, but just parsed-on-the-fly code. The parser should make
all the controls it needs to render a proper scene and leave the user no
chance but a renderable code.

Povray cries loud if i access the tenth element of a 5 elements array... i
(matematically) cry louder if somebody ask me the direction of a zero length
vector!

I never used a nan-able compiler, but i think enabling it is just a compiler
option, such out of bound array controls or something else. Can't it be
disabled?
Daniele.


Post a reply to this message

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