home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!darkstar.UCSC.EDU!aztec!paul
- From: paul@aztec.ucsc.edu (Paul Tatarsky)
- Newsgroups: comp.unix.ultrix
- Subject: Software test of Floating Point Unit in 5000/240??
- Date: 10 Sep 1992 19:33:47 GMT
- Organization: UC Santa Cruz CIS/CE
- Lines: 71
- Distribution: world
- Message-ID: <18o7urINNppv@darkstar.UCSC.EDU>
- Reply-To: paul@terra.ucsc.edu
- NNTP-Posting-Host: aztec.ucsc.edu
-
- A prof pointed out that the little code frag at the end of this
- note was producing bad output on one of our 5000/240's and not on the
- other ones. I checked the kernel for anything odd, and then the manuals,
- and I have two questions:
-
- 1. What is the story with the EMULFILT option? Older manuals say don't
- use it if you _have_ an fpu, newer ones say don't remove it from the
- config file. Well, it wasn't in my config file and when I added it
- and rebuilt/rebooted, I got the same results.
-
- 2. Anyone have a sure fire software test of the FPU unit?
-
- Now on to the test:
-
- The environment: Ultrix 4.2A, DECstations 5000/240
- Both have FPU units: fpu0 ( version 4.0, implementation 3 )
-
- The code frag float.c:
-
- #include <stdio.h>
-
- main()
- {
- float x,y;
- int i;
-
- y = .998;
- for(i = 0; i < 10; i++){
- x = (1.0/(1.0+y));
- /* z = 1.0/1.998;*/
- printf("%e %e\n",x,y);
- y = y-.001;
- }
- }
-
- On 5000/240 A:
- > cc -o float float.c
- > float
- 5.005005e-01 9.980000e-01
- 5.007511e-01 9.970000e-01
- 5.010020e-01 9.960001e-01
- 5.012531e-01 9.950001e-01
- 5.015045e-01 9.940001e-01
- 5.017561e-01 9.930001e-01
- 5.020080e-01 9.920001e-01
- 5.022601e-01 9.910001e-01
- 5.025125e-01 9.900001e-01
- 5.027652e-01 9.890001e-01
-
- On 5000/240 B:
- > float
- 5.000000e-01 9.980000e-01
- 5.000000e-01 9.970000e-01
- 5.000000e-01 9.960001e-01
- 5.000000e-01 9.950001e-01
- 5.000000e-01 9.940001e-01
- 5.000000e-01 9.930001e-01
- 5.000000e-01 9.920001e-01
- 5.000000e-01 9.910001e-01
- 5.000000e-01 9.900001e-01
- 5.000000e-01 9.890001e-01
-
- What is going on here? Further configuration info available on request.
- Eternal thanks to anyone with a solution.
-
- --
-
- Paul Tatarsky email: paul@cse.ucsc.edu
- UC Santa Cruz
- CIS/CE Board
- Technical Staff
-