delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/29/19:04:52

Date: Wed, 29 Jan 1997 18:56:14 -0500
Message-Id: <199701292356.SAA28049@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: deef AT pobox DOT oleane DOT com
CC: eblazecka AT bc DOT sympatico DOT ca, djgpp AT delorie DOT com
In-reply-to: <32EFC7D8.64A@pobox.oleane.com> (message from Francois Charton on
Wed, 29 Jan 1997 22:57:44 +0100)
Subject: Re: doubles vs. floats

> On PC with FPU, all float calculations are done in double precision, so 
> when you do something on a float, your machine will sometimes :

No, on ALL pcs (FPU or Emulator), all float calculations are done as
"long double" (80-bit native 387 format), so both floats and doubles
get converted.

However, many floats will get promoted to double to be passed as an
argument to a function (printf) and most math functions return double,
so using floats will result in extra conversions in those cases.

- Raw text -


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