POV-Ray : Newsgroups : povray.bugreports : 3.8 macro parsing errors : Re: 3.8 macro parsing errors Server Time
11 Oct 2024 17:03:56 EDT (-0400)
  Re: 3.8 macro parsing errors  
From: Bald Eagle
Date: 25 Jun 2024 09:50:00
Message: <web.667ac9df18d864b5c103d2725979125@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

> I also forgot, as I often do because of its name, about our val() SDL
> function which converts string floating point representations of values
> to internal double representations. The following works, which could be
> useful for +-inf maths.
>
> #debug concat("val(\"+inf\") = ",str(val("+inf"),19,17),"\n")
> #debug concat("val(\"-inf\") = ",str(val("-inf"),19,17),"\n")
> #debug concat("val(\"+nan\") = ",str(val("+nan"),19,17),"\n")
> #debug concat("val(\"-nan\") = ",str(val("-nan"),19,17),"\n")

Whoa.  This is interesting.
I don't currently have access to a machine to run the test with, but:
Can we use those for actual practical comparisons?

#if (N = "val(\"+inf\") )
.. . .
?

#if (N = "val(\"+nan\") )
.. . .
?

And are the signs required?

- BW


Post a reply to this message

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