derived types

Guy Harris guy at rlgvax.UUCP
Sat Feb 2 08:39:18 AEST 1985


> > The CDC 170 series doesn't support reals larger than 60-bits in the hardware.
> > It can be done, but only through software.  C is defined to calculate all
> > real numbers as doubles.  This means that there'll be a lot of wasted time
> > spent doing something the machine can't do with it's native instruction set.
> 
> This stupidity, due to how the hardware on the FP11 worked (do you guys out
> there even remember the PDP11?), ended up in the language definition.  No
> sensible compiler writer would kill floating point performance like these
> days.

It didn't even *have* to be done for the PDP-11; DEC's Fortran-IV Plus
compiler quite happily generated all the "setf"/"setd" instructions needed
to do single-precision arithmetic.  However, it may not have been worthwhile
to go through the hair involved for doing that in C.

> Its time we removed this stupidity from the language definition proper and
> turned the compatibility problem over to lint!

The current ANSI Standard C draft, I believe, leaves it up to the compiler
writer to decide whether to do floating point arithmetic in single or double
precision.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy



More information about the Comp.lang.c mailing list