double vs single precision
Doug Gwyn <gwyn>
gwyn at brl-tgr.ARPA
Wed Jan 8 23:59:41 AEST 1986
> My suggestion is to provide ANSI C with the standard pragmas
> #pragma float /* force single precision */
> #pragma double /* force double precision */
> that the programmer could insert above the arithmetic statement
> to specify the precision to use. These pragmas would be ignored
> on compilers that choose not to give the programmer a choice.
I think the use of #pragma for this is a good idea (I would use
"use-single-precision" or "no-single-precision" pragmas), but
the content of a #pragma should not be in the standard; it is
intended as a portable way to invoke processing that is beyond
the scope of the standard. Pragmas are implementation-specific.
More information about the Comp.lang.c
mailing list