Thread View: gnu.g++.lib.bug
1 messages
1 total messages
Started by Takashi Totsuka
Fri, 28 Aug 1992 00:00
libg++2.2.2 (Complex: :sqrt()) problem
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads