POV-Ray : Newsgroups : povray.general : 32.32 fixed float math? : Re: 32.32 fixed float math? Server Time
1 Aug 2024 18:25:19 EDT (-0400)
  Re: 32.32 fixed float math?  
From: Raf256
Date: 2 Jul 2005 12:35:11
Message: <cs7gp2-i28.ln1@raf256.com>
Raf256 <u97### [at] raf256com> Friday 01 of July 2005 18:23

> offer size of about -2,000,000,000 .. +2,000,000,000 with precision of

As theJackal just pointed me (at irc) operations like mul or pow are
strongly limited, but even raising size to power 3 (in example in
lightsource fading code etc) limits the maximum scene size... but then
again changing math to 48.16 format allows max scene size of 100,000 (all
above that is "infinity") while leaving precision of minimum size/detail at 
abot .00003

It might need some strange code (like skysphere made of sphere of radius
1,000,000) to be adjusted, but I think it might be really wort the effort.
 
B w, perhaps it would be not bad idea to move someday PovRay to C++ code? As
in - leave it as it is (do NOT rewrite it as object-oriented program) but
use of some benefits, like overloading of operators - this would make
changing the base math types very easy (just one #ifdef  
typdef float tPovGeometry   or like  typedef tMath48_16 tPovGeometry)
while resulting code (using nowday compilers) should be the same in speed
(only a little longer compilation time)...?

-- 


Post a reply to this message

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