delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/11/12/13:25:33

Date: Sat, 12 Nov 1994 09:38:08 -0500 (CDT)
From: Aaron Ucko <UCKO AT VAX1 DOT ROCKHURST DOT EDU>
Subject: Re: DJGPP & MATH
To: UCKO AT VAX1 DOT ROCKHURST DOT EDU
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Organization: Rockhurst College; Kansas City, MO

>>As I read much about floating point errors in GCC 1.12 or 1.11 nowdays,
>>maybe it is worthwile to report about my experinences.
>>I was given a C program written by Steven Pemberton (steven.cwi.nl)
>>which tests the capabilities of a C compiler. The copy I have is of Ver. 4.2.
>>I compiled and run it succesfully with TURBO C and C++ (Version 1.0 -2.0),
>>BORLAND C++ (Version 3.0, 3.1 and 4.0) compilers AND with DJGPP 1.09.
>>I switched on DJGPP 1.11 maint 5 a while ago and now it occured to me that
>>I gave the new compiler a test, and found out that it just crashes as you see:
>>
>>	go32 version 1.11.maint5 Copyright (C) 1993 DJ Delorie
>>	Produced by config version 4.2, CWI, Amsterdam
>>	Compiler claims to be ANSI C level 1
>>	
>>	Char = 8 bits, signed
>>	Short=16 int=32 long=32 float=32 double=64 bits
>>	Long double=96 bits
>		    ^^ not 80?  I suppose it must be changed for alignment
>reasons...
>
>>[...]
>
>>(And again with Version 1.09 of djgpp double and long double 
>>WERE IEEE numbers...)
>As I suggested, the difference is probably for alignment reasons.
>
>>I do not attach the TESTCCOM.C program to this letter as it is 
>>2279 lines long. If there will be enough people interested in it I will post 
>>it to this list or will try to put it somewhere on the net.
>Could you just give a URL?
Never mind; I ran across the latest version (5.0) and decided to try it 
myself.  It also crashes under DJGPP, but at a _much_ more sensible place:
when trying to divide by 0 (although it should have triggered a trap rather
than a floating point exception...)   What's _really_ interesting is that
DJGPP's float.h and limits.h were produced by enquire 4.3 (under an older
version of DJGPP, I suppose).  At any rate, the code can be found on cwi.nl in
/pub/steven/enquire/enquire.c.
--- Aaron Ucko (ucko AT vax1 DOT rockhurst DOT edu; finger for PGP public key) -=- httyp!
-=*=-Just because you're paranoid doesn't mean they aren't out to get you.-=*=-
Geek code 2.1 [finger hayden AT vax1 DOT mankato DOT msus DOT edu for explanation]: 
 GCS/M/S d(-) H s g+ p? !au a-- w+ v+ C++(+++)>++++ U-(S+)>++++ P+ L>++ 3(-) 
 E-(----) !N>++ K- W(--) M-(--) V(--) po-(--) Y+(++) t(+) !5 j R G tv--(-) 
 b+++ !D(--) B--(---) e>++++(*) u++(@) h!() f(+) r-(--)>+++ n+(-) y?

- Raw text -


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