Article View: gnu.g++.lib.bug
Article #235libg++2.2.2 (Complex: :sqrt()) problem
From: Takashi Totsuka
Date: Fri, 28 Aug 1992 00:00
Date: Fri, 28 Aug 1992 00:00
35 lines
1716 bytes
1716 bytes
Hello, This is to report a strange behavior (bug) of Complex::sqrt() on IRIS Crimson. Since Steve Rumsby told me at comp.sys.sgi that he has the same problem with his R3000/Indigo, I suspect this is not a particular problem of R4000/Crimson. Symptom: Complex::sqrt() returns incorrect value. Moreover, each time it is called with an identical argument, it returns a different value. Because of this, the test program tComplex.cc produces wrong output. I played with the method and found from printf(3) output that the return value of hypot(3) is incorrect. However, I still believe hypot(3) is correct since it works fine when I test the routine with a test program (under native cc and gcc2.2.2). Note: Funny behaviors I noticed are: (1) g++ -O and g++ -g yields different result. (2) rewriting the code to a set of simpler expressions using temporary variables makes -g version works. From these observations, I suspect if there is any proc-call convention problem or instruction scheduling problem. I would appreciate your help and please let me know if I could help you in any way. I'll be happy to send asm source etc. Takashi Totsuka totsuka@av.crl.sony.co.jp SONY Corporation
Technical Details
Message-ID:
<9208280000.AA02885@avaia.av.crl.sony.co.jp>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!avaia.av.CRl.sony.co.JP!totsukaShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.lib.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!avaia.av.CRl.sony.co.JP!totsuka From: totsuka@avaia.av.CRl.sony.co.JP (Takashi Totsuka) Subject: libg++2.2.2 (Complex: :sqrt()) problem Message-ID: <9208280000.AA02885@avaia.av.crl.sony.co.jp> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Fri, 28 Aug 1992 00:00:40 GMT Approved: bug-lib-g++@prep.ai.mit.edu Lines: 37