POV-Ray : Newsgroups : povray.bugreports : NAN math : Re: NAN math Server Time
30 Apr 2026 19:15:37 EDT (-0400)
  Re: NAN math  
From: jr
Date: 29 Apr 2026 11:35:00
Message: <web.69f2244ed5ad998f48bf72fa6cde94f1@news.povray.org>
hi,

kurtz le pirate <kur### [at] freefr> wrote:
> On 27/03/2026 00:13, Bald Eagle wrote:
> > ...
> > 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.
> > ...
> Tim Nikias's message does not specify a POV version.
> But, mathematically speaking, it makes sense :
>
> lim      1/x = +∞ and    lim      1/x = -∞
> x -> 0+                  x -> 0-
>
> but no NAN.
>
> In version 3.8 this code
>  #declare a = 1/0;
>  #debug concat("a = ",str(a,0,-1),"\n")
>
> Give :
>  Parse Warning: Divide by zero.
>  a = inf

(not knowing what I do :-)) a-a displays -nan.


regards, jr.


Post a reply to this message

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