delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/30/11:43:10

Xref: news2.mv.net comp.lang.c:54379 comp.lang.c++:69864 comp.os.msdos.djgpp:651 gnu.g++.help:4421 gnu.gcc.help:5635
From: axl AT zedat DOT fu-berlin DOT de (Axel Thimm)
Newsgroups: comp.lang.c,comp.lang.c++,gnu.gcc.help,gnu.g++.help,comp.os.msdos.djgpp
Subject: Re: float != float and floats as return types
Date: Tue, 30 Jan 1996 13:19:40 GMT
Organization: FU Berlin
Lines: 25
Message-ID: <4el5qt$j5j@fu-berlin.de>
References: <4ej9lb$mpc AT fu-berlin DOT de>
Reply-To: axl AT zedat DOT fu-berlin DOT de
NNTP-Posting-Host: axl.dialup.fu-berlin.de (160.45.218.93)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Many thanks to all who have answered,
I have received lots of mail about this.
The problem is that gcc sometimes uses the coprocessor registers/stack
to store floating point values. This is done in long double precision
for i386. This should also happen with 68000 processors. This can be
turned off in gcc with the following switch, which is rather
self-explaining.

-ffloat-store
      Do not store floating point variables in registers.
      This  prevents  undesirable excess precision on ma-
      chines such as the 68000 where the floating  regis-
      ters (of the 68881) keep more precision than a dou-
      ble is supposed to have.

      For most programs, the excess precision  does  only
      good,  but a few programs rely on the precise defi-
      nition of IEEE floating point.  Use `-ffloat-store'
      for such programs.

===
Axel Thimm <axl AT zedat DOT fu-berlin DOT de>
Freie Universitaet Berlin
===

- Raw text -


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