home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / ultrix / 8239 < prev    next >
Encoding:
Text File  |  1992-11-11  |  2.2 KB  |  61 lines

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