# long double literal

Discussion in 'C Programming' started by Ioannis Vranos, Mar 4, 2008.

1. ### Ioannis VranosGuest

Do we designate a long double literal using an L after a floating point
literal, in the style:

long double d= 543.4545L;

Ioannis Vranos, Mar 4, 2008

2. ### Walter RobersonGuest

In article <fqkgmf\$1plc\$>,
Ioannis Vranos <> wrote:
>Do we designate a long double literal using an L after a floating point
>literal, in the style:

>long double d= 543.4545L;

Yes, L or l (lower-case L) can be used.

--
"The shallow murmur, but the deep are dumb." -- Sir Walter Raleigh

Walter Roberson, Mar 4, 2008

3. ### Ioannis VranosGuest

Walter Roberson wrote:
> In article <fqkgmf\$1plc\$>,
> Ioannis Vranos <> wrote:
>> Do we designate a long double literal using an L after a floating point
>> literal, in the style:

>
>> long double d= 543.4545L;

>
> Yes, L or l (lower-case L) can be used.

Both apply to C90/C95?

Ioannis Vranos, Mar 4, 2008
4. ### Walter RobersonGuest

In article <fqkh8d\$1plc\$>,
Ioannis Vranos <> wrote:
>Walter Roberson wrote:
>> In article <fqkgmf\$1plc\$>,
>> Ioannis Vranos <> wrote:
>>> Do we designate a long double literal using an L after a floating point
>>> literal, in the style:

>>
>>> long double d= 543.4545L;

>> Yes, L or l (lower-case L) can be used.

>Both apply to C90/C95?

Unless it got revoked in C95 ;-) I pulled the information from C89.

--
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth

Walter Roberson, Mar 4, 2008
5. ### Ioannis VranosGuest

Walter Roberson wrote:
> In article <fqkh8d\$1plc\$>,
> Ioannis Vranos <> wrote:
>> Walter Roberson wrote:
>>> In article <fqkgmf\$1plc\$>,
>>> Ioannis Vranos <> wrote:
>>>> Do we designate a long double literal using an L after a floating point
>>>> literal, in the style:
>>>> long double d= 543.4545L;

>
>>> Yes, L or l (lower-case L) can be used.

>
>> Both apply to C90/C95?

>
> Unless it got revoked in C95 ;-) I pulled the information from C89.

OK, thanks. AFAIK, C95 didn't revoke anything, bug fixes and 3 new

Ioannis Vranos, Mar 4, 2008
6. ### Falcon KirtaranGuest

Ioannis Vranos wrote:
> Do we designate a long double literal using an L after a floating point
> literal, in the style:
>
>
> long double d= 543.4545L;

I have used a lowercase l for this.

--
--Falcon Kirtaran

Falcon Kirtaran, Mar 7, 2008
7. ### Micah CowanGuest

Falcon Kirtaran <> writes:

> Ioannis Vranos wrote:
>> Do we designate a long double literal using an L after a floating
>> point literal, in the style:
>>
>>
>> long double d= 543.4545L;

>
> I have used a lowercase l for this.

That's not a great idea, given that l and 1 look very very similar in
many fonts commonly used for viewing program sources.

--
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/

Micah Cowan, Mar 7, 2008
8. ### jaysomeGuest

On Fri, 07 Mar 2008 06:28:08 GMT, Micah Cowan <>
wrote:

>Falcon Kirtaran <> writes:
>
>> Ioannis Vranos wrote:
>>> Do we designate a long double literal using an L after a floating
>>> point literal, in the style:
>>>
>>>
>>> long double d= 543.4545L;

>>
>> I have used a lowercase l for this.

>
>That's not a great idea, given that l and 1 look very very similar in
>many fonts commonly used for viewing program sources.

Others agree with you (including me).

http://www.gimpel.com/html/oldbugs/bug620.htm

Best regards
--
jay

A free OS that supports one of the best (free) C compilers available:
http://www.ubuntu.com/

jaysome, Mar 7, 2008
9. ### santoshGuest

OT - Re: long double literal

jaysome wrote:

<snip>

What a complete turnaround WRT your sig. You used to fervently tout
Vista, what happened?

santosh, Mar 7, 2008
10. ### Richard HeathfieldGuest

Re: OT - Re: long double literal

santosh said:

> jaysome wrote:
>
> <snip>
>
> What a complete turnaround WRT your sig. You used to fervently tout
> Vista, what happened?

Presumably, Vista happened.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999

Richard Heathfield, Mar 7, 2008
11. ### Randy HowardGuest

Re: OT - Re: long double literal

On Fri, 7 Mar 2008 02:13:28 -0600, Richard Heathfield wrote
(in article <>):

> santosh said:
>
>> jaysome wrote:
>>
>> <snip>
>>
>> What a complete turnaround WRT your sig. You used to fervently tout
>> Vista, what happened?

>
> Presumably, Vista happened.

Yeah, but to go to Ubuntu, it must have caused brain damage when it
did.

--
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

Randy Howard, Mar 7, 2008
12. ### CBFalconerGuest

Re: OT - Re: long double literal

Randy Howard wrote:
> Richard Heathfield wrote
>> santosh said:
>>
>>> <snip>
>>>
>>> What a complete turnaround WRT your sig. You used to fervently
>>> tout Vista, what happened?

>>
>> Presumably, Vista happened.

>
> Yeah, but to go to Ubuntu, it must have caused brain damage when
> it did.

Well, that is one of the known prime effects of Vista. It is
simply the culmination of Microsoft efforts so far.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>