|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> #local i=0;
> #while (i<1)
> #debug concat(str(i,0,2),"\n")
> #local i=i+0.1;
> #end
Try
#local i = 0;
#while (i < 10)
#debug concat(str(i/10, 0, 2), "\n")
#local i = i + 1;
#end
Since there is no round off error with adding integers.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mael wrote:
> ok, thank you, it's clear.. we can't trust computers for maths :)
Yes we can. As long as we remembers that computers do not have the same
number of fingers to count on.
--
/*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
/* flabreque */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
/* @ */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
/* videotron.ca */}camera{location<6,1.25,-6>look_at a orthographic}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mael <mae### [at] hotmailcom> wrote:
: isn t it strange to get a roundoff error for only 10 additions ? i thought
: pov was more precise :(
0.1 can't be represented accurately with binary floating point format.
The reason is the same as why 1/3 can't be represented accurately with
decimal format.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Note that counting in integers will work fine, and so should counting by
fractions that are non-repeating decimals in binary, such as .25, .125, and
.0625.
- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]
"Francois Labreque" <fla### [at] videotronca> wrote in message
news:3BC### [at] videotronca...
>
>
> Mael wrote:
>
> > ok, thank you, it's clear.. we can't trust computers for maths :)
>
>
> Yes we can. As long as we remembers that computers do not have the same
> number of fingers to count on.
>
> --
> /*Francois Labreque*/#local a=x+y;#local b=x+a;#local c=a+b;#macro P(F//
> /* flabreque */L)polygon{5,F,F+z,L+z,L,F pigment{rgb 9}}#end union
> /* @ */{P(0,a)P(a,b)P(b,c)P(2*a,2*b)P(2*b,b+c)P(b+c,<2,3>)
> /* videotron.ca */}camera{location<6,1.25,-6>look_at a orthographic}
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Slime <noo### [at] hotmailcom> wrote:
: Note that counting in integers will work fine
... as long as they are not too big.
Of course the integers you can handle accurately with a double type are
quite big (several thousands of millions...).
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> (several thousands of millions...).
Now *there's* a phrase to cause anxiety in an American listening to an
international audience.
thousand=1E03
million = 1E06
thousand millions=1E09?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I had a discussion at work here about that once:
In the US:
million = 10^6
billion = 10^9 (thousand million)
In UK:
million = 10^6
billion = 10^12 (million million)
Read this article from the Straight Dope:
http://www.straightdope.com/mailbag/mgazilli.html
-tgq
"Greg M. Johnson" <"gregj56590[:-0]"@aol.com> wrote in message
news:3BC5AAE4.2D531AF1@aol.com...
> Warp wrote:
>
> > (several thousands of millions...).
>
> Now *there's* a phrase to cause anxiety in an American listening to an
> international audience.
>
> thousand=1E03
> million = 1E06
>
> thousand millions=1E09?
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Greg M. Johnson <"gregj56590[:-0]"@aol.com> wrote:
:> (several thousands of millions...).
: Now *there's* a phrase to cause anxiety in an American listening to an
: international audience.
I know the 'billion' problem in the UK/US, so I deliberately used the
term "thousands of millions" instead. I don't know how good it sounds, but
I don't care; I don't want to cause confusion.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
and "thousand" is 10^3.
Trevor Quayle wrote:
> I had a discussion at work here about that once:
>
> In the US:
> million = 10^6
> billion = 10^9 (thousand million)
>
> In UK:
> million = 10^6
> billion = 10^12 (million million)
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> term "thousands of millions" instead. I don't know how good it sounds, but
> I don't care; I don't want to cause confusion.
Is that 10^9?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|