www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/26/12:37:38

From: Kbwms <Kbwms AT aol DOT com>
Message-ID: <b07cbd70.35435f90@aol.com>
Date: Sun, 26 Apr 1998 12:23:43 EDT
To: eliz AT is DOT elta DOT co DOT il
Cc: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Re: Running paranoia in Single Mode

Dear Eli Zaretskii,

On 04-26-98 at 05:02:48 EST you wrote:
> CC:	djgpp AT delorie DOT com
>
>
> 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:
[ ... ]
> >
> 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.
>
According to the lead-in comments in paranoia.c, the original version
was written in Basic, then Pascal, then C.

Although not standard ANSI, no less a worthy than P.J. Plauger has seen
fit to include both float and long double versions in his library.

> 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.
>

While it is true that in many implementations computations are performed
in extra precision for both float and double, limiting values differ in
each precision.  It makes little sense to me to claim that float values
are checked, when the keyword "Single" is defined, only to discover that
such is not the case.

Thanks for the thoughtful response.

Sincerely,
K.B. Williams

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019