delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/30/11:32:10

From: Jens Bischoff <J DOT Bischoff AT airbus DOT dasa DOT de>
Message-Id: <9707301529.AA10623@hpguber.bre.da>
Subject: Re: having trouble with long numbers
To: schweikh AT rubin DOT noc DOT dfn DOT de (Jens Schweikhardt) (Jens Schweikhardt)
Date: Wed, 30 Jul 97 17:29:18 MESZ
Cc: djgpp AT delorie DOT com
In-Reply-To: <5rmp03$58l$1@news.belwue.de>; from "Jens Schweikhardt" at Jul 30, 97 7:03 am
Mailer: Elm [revision: 70.85]


> # Use a double. It will have precision up to 14 digits.
> 
> Nope. The Standard guarantees only a number of 10 significant digits
> minimum.  The actual limit on your system is available with DBL_DIG
> from <float.h>.  If DBL_DIG is too small, you could try long double
> with LDBL_DIG digits.  However, LDBL_DIG is only guaranteed to be at
> least 10 as well.

I have never seen a machine with only 10 significant digits for a 
double precision number. I mean that's the situation today; 
maybe someone uses a old-fashioned computer/compiler that can't do better.
I would use a double precision variable.

----
|      |      | Jens Bischoff   |   Daimler-Benz Aerospace Airbus |
|   --<O>--   +-----------------+---------------------------------+
|      |      | Aerodynamic Data Department (EFD)                 |
| Dasa Airbus | Huenefeldstrasse 1-5     D-28199 Bremen (Germany) |

- Raw text -


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