🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #49928

strange output

#49928
From: David Richards
Date: Tue, 07 Dec 1993 18:45
18 lines
1097 bytes
Hello folks - here's the problem:

#include <stdio.h>
main()
{
   long double ldb = 22343546554.435551;
   printf("ldb = %f\n", ldb);
}

compile with: gcc -o longd longd.c
BUT THE OUTPUT READS: ldb = 8.500005

Forgive me if I'm dreaming but it looks like a bug to me!!
Am I missing something that's so painfully obvious that an
amoeba could see it?!#%@^??
I'm running on NeXT 3.1- when using cc this doesn't  
happen.
Dave Richards
Technical Details
Message-ID: <9312071842.AA02949@aaron.music.qc.edu>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!aaron.music.qc.edu!richards

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,6f7a036dfb120868,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-12-08 08:16:45 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!aaron.music.qc.edu!richards
From: richards@aaron.music.qc.edu (David Richards)
Newsgroups: gnu.gcc.help
Subject: strange output
Date: 7 Dec 1993 13:45:53 -0500
Organization: GNUs Not Usenet
Lines: 19
Sender: daemon@cis.ohio-state.edu
Distribution: gnu
Message-ID: <9312071842.AA02949@aaron.music.qc.edu>