www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/30/11:35:18

From: Ryan Blazecka <eblazecka AT bc DOT sympatico DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: doubles vs. floats
Date: Wed, 29 Jan 1997 19:03:46 -0800
Organization: BCTEL Advanced Communications
Lines: 14
Message-ID: <32F00F92.1662@bc.sympatico.ca>
References: <199701292356 DOT SAA28049 AT delorie DOT com>
Reply-To: eblazecka AT bc DOT sympatico DOT ca
NNTP-Posting-Host: nwmr01m02-27.bctel.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

DJ Delorie wrote:
> 
> > 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.
So then (disregarding calling the math functions, printf, etc), using
long doubles would be even faster, right?

- Raw text -


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