POV-Ray : Newsgroups : povray.general : Large numbers? : Re: Large numbers? Server Time
8 Aug 2024 01:20:24 EDT (-0400)
  Re: Large numbers?  
From: Jan Walzer
Date: 1 Apr 2001 09:49:56
Message: <3ac73204$1@news.povray.org>
> I hate to point out the obvious, but a double float can only exactly
> represent the same number of values as a double integer (they're
both
> 64-bit) :) Though your other points were very informative, thanks.

the number of valid FPs is less than 2^64 ...
There are some combinations that are not allowed...
consider 0E1 and 0E10 and 0E100 ...
they are the same number, numerically.
to make them compareable in memory, they'll get normalized...
mostly they'll be saved as 0E0 (that is not 0^0 but 0*(10^0)) and the
other combinations are used to represent some special states of the
FP-Unit for example "NaN"

So we can conclude: 64Int can represent more numbers than 64Float

.... just my peanuts ...

--
background{rgb 1}camera{location<1,5,-2>look_at 0}#macro
m(a,b,i)#local d=(b-a)
/8;#local
e=vcross(d,y);#if(i)m(a-e,a+e+2*d,i-1)m(a+e,a+2*d-e,i-1)m(a+3*d-e,a+e
+3*d,i-1)m(a+3*d-e,a+5*d-e,i-1)m(a+6*d-e,a+e+6*d,i-1)m(a+8*d-e,a+e+8*d
,i-1)#else
cylinder{a,b,vlength(d)/3 pigment{rgb 0}}#end#end m(-4*x,2*x,4) // Jan
Walzer


Post a reply to this message

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