This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: floating point war casualty list

At 12:22 AM -0700 5/29/02, Zack Weinberg wrote:
>On Tue, May 28, 2002 at 06:41:01PM -0400, Alan Lehotsky wrote:
>>  If I recall correctly, there are TWO (or more) PDP-11 floating point
>>  formats.  I think it had something to do with word-order for the
>>  double-precision FP, but since it's been close to 25 years since I
>>  last did anything with the PDP-11 my memory is somewhat fuzzy.
>As far as I know, there's F (single precision), D and G (two versions
>of double), and H (extended).

	On the VAX, yes.   But the PDP-11 had some architectural weirdity in
	maybe the PDP-11/40's FP.  And it was corrected in the 11/45, which
	was the basic ILA emulated in the VAX's PDP-11 emulator.

>I had been under the impression that real.c implemented F and G
>formats, but from what people have been saying, real.c's VAX double is
>D format (which may be wrong - G format is/was more popular), and its
>VAX single is actually IEEE format, which is definitely wrong.

	G & H formats were implemented as "specials" for Harvard's Smithsonian
	Astrophysical Observatory.  They wouldn't buy a machine unless DEC had
	a FP with sufficient exponent to count all the atoms 
estimated in the known
	(circa 1976) universe.  They also felt that the magnitude 
representation of
	G and D was insufficiently accurate for the calculations they 
wanted to form.

	[This is a second hand account from the G&H HW developers.  I 
	G & H support in the Bliss compiler as builtin functions at the time]

>Be nice if we had all four and could switch between D and G at
>runtime, but this is nontrivial to implement.

	There is NO reason why all 4 cannot co-exist - there are 
individual instructions
	for each form addf, addd, addg, addh, not "modes".  Of 
course, since in most
	languages you can't disambiguate "double" as being 
specifically G or D, it's
	impractical.  I would bet that most languages implemented a 
specific type-name
	as an extension.

Al Lehotsky

		    Quality Software Management
		          (978)287-0435 Voice
		          (978)808-6836 Cell

	Software Process Improvement / Management Consulting
	     Language Design / Compiler Implementation

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]