home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.ultrix
- Path: sparky!uunet!gumby!destroyer!wsu-cs!vela!amaranth
- From: amaranth@vela.acs.oakland.edu (Paul Amaranth)
- Subject: Re: FPU errors on 5000/240
- Message-ID: <1992Nov11.185218.15068@vela.acs.oakland.edu>
- Organization: Oakland University, Rochester MI.
- References: <BxIB5y.JL0@ns1.nodak.edu> <1992Nov10.161523.20950@hubcap.clemson.edu>
- Date: Wed, 11 Nov 1992 18:52:18 GMT
- Lines: 50
-
- In article <1992Nov10.161523.20950@hubcap.clemson.edu> cyclist@hubcap.clemson.edu (Barry Johnson) writes:
- >grosen@isc.cs.ndsu.nodak.edu (Johannes Grosen) writes:
- >Could someone post the code, or put it at an FTP site? If someone will
- >send it, I'll become an anon ftp site for it...
- >
-
- This short program was inspired by Arthur Smith's program. It will only show
- problems on cpus that are sensitive to his program (3 out of 4 240's we
- had here did not show problems with this or Smith's program, all of them
- showed problems with Ponder's program)
-
- I haven't had time to figure out exactly why this works, but a number
- of factors appear to be important:
- a) Calculations with the loop variable seem to be important.
- b) Mixed floating/integer calculations seem to be important.
- c) An involved floating point expression seems to be important.
- d) This example only fails with i>> 1000
-
- The correct answer should be
- -86354540.28327117
-
- The interesting thing, is that, at least on one of our 240s, the
- right answer is generated about 12% of the time.
-
- Compile it with the command
- f77 -O pgm.f -o pgm
- If you compile it without -O, you will consistently get the wrong answer.
- With -O, you get different answers :-)
-
- c A program to try to test that pesky 240 problem
- real*8 a1,a2, a3, ainv
- a1 = 1.23456789012345
- a2 = .00345234568921232
- do 100 i=1,10000
- ainv = 1.0/i
- a2 = a1 - a2*a1 - ainv + 1/(a1*a2)
- if (a2 .gt. 10e6) a2=1.2345
- a3 = a2 * i
- 100 continue
- print *, a3
- stop
- end
-
-
-
- --
- Paul Amaranth Manager User Services - office: (313) 370 4541 (also voicemail)
- (internet) amaranth@vela.acs.oakland.edu | This space
- (bitnet) amaranth@oakland | temporarily
- (uucp) ...!uunet!umich!vela!amaranth | empty
-