Article View: gnu.gcc.help
Article #49996Re: Strange floating point results
From: Philippe Pouliquen
Date: Thu, 25 Nov 1993 18:59
Date: Thu, 25 Nov 1993 18:59
36 lines
2103 bytes
2103 bytes
In article <1993Nov24.155323.22771@njitgw.njit.edu> kxn3796@hertz.njit.edu (Ken Nakata) writes: >I wrote a program for my VAX assembly class' programming assignment >and it solves simple equations by iteration. C version is following; > ... >My VAX assembly program agrees with the above C program compiled by cc >on SunOS 4.x.x (sorry don't remember); > ... >However, the same C program compiled by two versions of gcc (2.4.3 and >2.3.1) don't agree with the above results; > ... >Ken Nakata > ... Your results are quite interesting. I got: x = 0.899475740409558, y = 2.038799794467183 (your VAX results) on a VAXstation 2000 (cc) a DECstation 3100 (cc and gcc2.1) a SGI Indigo R4000 (cc and gcc2.4.5) (NOTE: I changed your use of 'abs()' to 'fabs()') I was initially tempted to attribute your strange results to the fact that the VAX uses DEC's floating point formats, whereas the DECstation 3100 uses IEEE floating point formats. (The difference being that the VAX double has 56 bits in the mantissa, whereas the IEEE has 52). BTW, since the 21064 (ALPHA processor) supports both IEEE and VAX formats, does anybody know how to specify which format you want in gcc? Also, does anybody know when the GNU debugger and assembler will support the ALPHA architecture? Is anybody working on this port? Philippe O. Pouliquen (philippe@zeus.ece.jhu.edu)
Technical Details
Message-ID:
<2d2v9sINNpme@jhunix.hcf.jhu.edu>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!mozart.amil.jhu.edu!jhunix.hcf.jhu.edu!jhunix.hcf.jhu.edu!not-for-mailReferences:
<1993Nov24.155323.22771@njitgw.njit.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,456129b01d21acf1 X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-11-25 10:58:49 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!mozart.amil.jhu.edu!jhunix.hcf.jhu.edu!jhunix.hcf.jhu.edu!not-for-mail From: philippe@jhunix.hcf.jhu.edu (Philippe Pouliquen) Newsgroups: gnu.gcc.help Subject: Re: Strange floating point results Date: 25 Nov 1993 13:59:08 -0500 Organization: Homewood Academic Computing, Johns Hopkins University, Baltimore, Md, USA Lines: 37 Message-ID: <2d2v9sINNpme@jhunix.hcf.jhu.edu> References: <1993Nov24.155323.22771@njitgw.njit.edu> NNTP-Posting-Host: jhunix.hcf.jhu.edu