POV-Ray : Newsgroups : povray.unofficial.patches : Noisy thoughts : Re: Noisy thoughts Server Time
2 Sep 2024 04:12:35 EDT (-0400)
  Re: Noisy thoughts  
From: Jérôme Berger
Date: 29 Sep 2000 06:19:14
Message: <39D46C9D.907A461A@enst.fr>

> 
> Nathan Kopp wrote:
> >
> > Could this be done using shift operators (is the period a multiple of 2)?
> >
>         That only works once the double has been changed into a long, but there
> might be something I can do there... I'll have to look at it in more
> detail.
	That did it! The time (with the range fix) is now at 461.67 :) I don't
know why I had decided that it wouldn't work with negative numbers when
I first looked at it. Of course the range is still limited to what a
"long" can contain, but that's pretty big...

	Now I've got an interresting puzzle: knowing that "x_ix" and "x_jx" are
both doubles, why is this:
x_jx = 1 - x_ix;
faster than this:
x_jx = 1.0 - x_ix;
??

	I would understand slower (since there is a conversion to do) or same
speed (if the compiler is smart enough to do the conversion at compile
time), faster??


-- 

* Doctor Jekyll had something * mailto:ber### [at] inamecom
* to Hyde...                  * http://www.enst.fr/~jberger
*******************************


Post a reply to this message

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