POV-Ray : Newsgroups : povray.bugreports : 3.8 macro parsing errors : Re: 3.8 macro parsing errors Server Time
27 Jul 2024 07:53:37 EDT (-0400)
  Re: 3.8 macro parsing errors  
From: William F Pokorny
Date: 25 Jun 2024 05:21:28
Message: <667a8c18$1@news.povray.org>
On 6/24/24 20:30, William F Pokorny wrote:
> #declare Val = 1.012345678901234567890/(+0.0); // +inf Why + ?

Should have read:

#declare Val = 1.012345678901234567890/(-0.0); // +inf Why + ?

---

FWIW. This morning I glanced at the str() implementation while my coffee 
maker worked. You can on overflowing an internal buffer, trigger 
exponential (%g) formatting, but that method is of course not of 
practical use...

---

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")

---

Aside. I've have avoided putting much work into the SDL string functions 
in yuqk because I want to do that work alongside a move to all utf8 
string handling (with conversions to ucs4 internally for things like 
strlen(), maybe message passing too, I don't know - all at that dream 
planning stage).

Bill P.


Post a reply to this message

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