www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/31/02:00:46

Date: Wed, 31 Jan 1996 08:44:47 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Axel Thimm <axl AT zedat DOT fu-berlin DOT de>
Cc: djgpp AT delorie DOT com
Subject: Re: float != float and floats as return types

On Tue, 30 Jan 1996, Axel Thimm wrote:

> 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

Just to make the picture complete: this switch should only be used in 
programs which break without it, because holding intermediate results in 
the most precise representation makes FP computations more accurate.  
Programs which break unless -ffloat-store is used are usually just buggy 
programs, IMHO, but if you get a gazillion-line-long program and are told 
by your boss to make it work by tomorrow morning, you sometimes don't 
have an alternative...

Another case of justified use of that switch is a program which explores 
the intricacies of the floating-point representation of a machine.

- Raw text -


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