|
![](/i/fill.gif) |
David Wallace <dar### [at] earthlink net> wrote:
> So, what is the fastest and easiest way to detect NaN floats and vectors?
There isn't.
What happens eg. with a division by 0 is completely system-dependant,
and even whether you get a 'NaN' value or something else is
system-dependant. (In fact, the 'NaN' value itself is system-dependant
because not all architectures implement the IEEE floating point numbers.)
There's no portable way of testing "is this value a NaN?".
The only way you can prevent it from happening is to test the
operands of the division prior to performing the division.
--
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |