Mail Archives: djgpp/1998/04/26/05:03:59
On Fri, 24 Apr 1998, Kbwms wrote:
> This block shows that functions of type double are used when
> running in Single mode. To properly check the arithmetic,
> this code should be changed to reference functions of type
> float:
>
> #ifdef Single
> #define FLOAT float
> #define FABS(x) fabsf((x))
> #define FLOOR(x) floorf((x))
> #define LOG(x) logf((x))
> #define POW(x,y) powf((x),(y))
> #define SQRT(x) sqrtf((x))
These functions are not ANSI-standard, so I guess whoever ported
paranoia to C (it was originally a Fortran program, IIRC) opted to use
only what they could expect to be available.
If you indeed care that much for the quality of the float versions,
you can try making these changes yourself. Personally, I find that
testing the float versions doesn't make much sense, since serious FP
computations usually require all variables to be doubles anyway.
- Raw text -