Path: 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: Date: 17 Feb 90 21:09:02 GMT Sender: news@netnews.upenn.edu Distribution: gnu Organization: University of Pennsylvania, Philadelphia, PA Lines: 27 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 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