Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Stefan Schroepfer <scr@iis.fhg.de>
Subject: Re: Doubles broken
Date: Wed, 07 Jan 1998 11:04:11 +0100	[thread overview]
Message-ID: <34B3531B.41C67EA6@iis.fhg.de> (raw)

Quezcal wrote:
> 
> If I use doubles for floating point calculations i get a lot of
> floating point exceptions, e.g. with this:
> 
> main()
> {
> double a,b,c;
> 
> a = -1;
> b = 1e-310;
> c=a*b;
> printf("%lf\n",c);
> }
> 
> [...]

In addition to your second mail concerning '-mieee':

The 'l' modifier is not apllicable to the 'f' format specification
in printf, according to the printf man page 'f' is already suitable
for double.
Here is what gcc says with '-Wall':

warning: use of `l' length character with `f' type character

Stefan Schroepfer
scr@iis.fhg.de

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

             reply	other threads:[~1998-01-07 10:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-07 10:04 Stefan Schroepfer [this message]
     [not found] <199801062028.VAA28940@xyllomer.uni-paderborn.de>
1998-01-06 22:10 ` Doubles broken Quezcal
  -- strict thread matches above, loose matches on Subject: below --
1998-01-06 20:28 Quezcal
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox