www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/11/27/05:07:50

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3DE48D97.7B62093C@phekda.freeserve.co.uk>
Date: Wed, 27 Nov 2002 09:17:11 +0000
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Difficulty with long double
References: <1FCB82C4018 AT HRZ1 DOT hrz DOT tu-darmstadt DOT de>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Juan Manuel Guerrero wrote:
[snip]
>   long double a=1.0e309;
[snip]

Here's what C99 says about suffixes and long double values in section 6.4.4.2,
part 4 (page 58 of the PDF):

"An unsuffixed floating constant has type double. If suffixed by the letter f
or F,it has 
type float. If suffixed by the letter l or L, it has type long double."

So your code should probably be like this:

    long double a=1.0e309L;

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


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