Mail Archives: djgpp/1998/11/16/10:22:16
On Mon, 16 Nov 1998, Toni Rasanen wrote:
> First, should I use float or double as my innerloop variables?
My advice is to always use double, unless you have large arrays and
memory is at premium.
> Which one is actually faster, or do they have any difference?
There should be no significant difference, since the FPU does everything
in 80-bit long double format, and converts it to float or double only
when it stores data in memory.
Computations with floats are much less accurate (slightly more than 6
significant digits), so complex computations might produce unexpected
results unless you are very careful in writing the code.
- Raw text -