Article View: gnu.g++.bug
Article #2230Is it a bug
From: Chin Wu
Date: Sat, 17 Feb 1990 21:09
Date: Sat, 17 Feb 1990 21:09
27 lines
1198 bytes
1198 bytes
I just installed G++ on our IRIS 4D using gcc-1.37, g++-1.36.4 and
libg++-1.36.3. Since I have to do a few modifications during my
installion. I don't know if this is a bug or because of some errors I
made when I install the compiler. Following is the program and its
output. It behaves erraneous when deal with "float", but seems all
right using "double". Although I can work around using the "form()",
I, however, like to see the second way to work.
PROGRAM:
#include <stream.h>
main()
{
float f = 0.2;
double d = 0.4;
cout << form("%f\n%f\n", d, f);
cout << d << "\n" << f << "\n";
}
OUTPUT:
0.000000
0.200000
0.4
1.3411e-08 <-- ERROR
chin@sg1.chem.upenn.edu
Technical Details
Message-ID:
<CHIN.90Feb17160902@sg1.chem.upenn.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!bu.edu!snorkelwacker!think!zaphod.mps.ohio-state.edu!swrinde!emory!mephisto!ncar!boulder!rutgers!netnews.upenn.edu!chinShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!bu.edu!snorkelwacker!think!zaphod.mps.ohio-state.edu!swrinde!emory!mephisto!ncar!boulder!rutgers!netnews.upenn.edu!chin From: chin@sg1.chem.upenn.edu (Chin Wu) Newsgroups: gnu.g++.bug Subject: Is it a bug Message-ID: <CHIN.90Feb17160902@sg1.chem.upenn.edu> Date: 17 Feb 90 21:09:02 GMT Sender: news@netnews.upenn.edu Distribution: gnu Organization: University of Pennsylvania, Philadelphia, PA Lines: 27