POV-Ray : Newsgroups : povray.bugreports : NAN math Server Time
28 Mar 2026 16:34:13 EDT (-0400)
  NAN math (Message 1 to 1 of 1)  
From: Bald Eagle
Subject: NAN math
Date: 26 Mar 2026 19:15:00
Message: <web.69c5bd96c7b9ee321f9dae3025979125@news.povray.org>
I've been working on making my vector arity macro robust, and I came across this
surprising fact while stress testing.

NAN is treated differently in the parser than in the function VM.

NAN equals - EVERYTHING in the parser.

NAN equals nothing, not even itself in the function VM.

So my IfNan () macro fails, but my IfNan () function works as expected.

I'll need to dig into this and see where in the source it goes wrong.

I also recall seeing a thread where people were playing with N/0, and I think
the parser biases that - probably because it allows certain code to keep going.

https://news.povray.org/44294a5a%241%40news.povray.org

- BE


Post a reply to this message

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