home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / ibm / pc / hardware / 24347 < prev    next >
Encoding:
Text File  |  1992-09-15  |  58.3 KB  |  945 lines

  1. Newsgroups: comp.sys.ibm.pc.hardware
  2. Path: sparky!uunet!paladin.american.edu!europa.asd.contel.com!darwin.sura.net!jvnc.net!yale.edu!ira.uka.de!rz.uni-karlsruhe.de!usenet
  3. From: S_JUFFA@iravcl.ira.uka.de (|S| Norbert Juffa)
  4. Subject: What you always wanted to know about math coprocessors 3/4
  5. Message-ID: <1992Sep15.162827.11073@rz.uni-karlsruhe.de>
  6. Sender: usenet@rz.uni-karlsruhe.de (USENET News System)
  7. Organization: University of Karlsruhe (FRG) - Informatik Rechnerabt.
  8. Date: Tue, 15 Sep 1992 16:28:27 GMT
  9. X-News-Reader: VMS NEWS 1.23
  10. Lines: 933
  11.  
  12.          Whetstone [2,3,4] is a synthetic benchmark based upon statistics
  13.          collected about the use of certain control and data structures
  14.          in programs written in high level languages. Based on these
  15.          statistics, Whetstone tries to mirror a 'typical' HLL program.
  16.          Whetstone performance is expressed by how many theoretical
  17.          'whetstone' instructions are executed per second. It was
  18.          originally implemented in ALGOL. Unlike PEAKFLOP, LLL, and
  19.          Linpack, Whetstone not only uses addition and multiplication
  20.          but exercises all basic arithmetic operations as well as some
  21.          transcendental functions. Whetstone performance depends on the
  22.          speed of the coprocessor as well as on the speed of the CPU,
  23.          while PEAKFLOP, LLL, and Linpack place a heavier burden on the
  24.          coprocessor/FPU. There exists an old and a new version of
  25.          Whetstone. Note that results from the two versions can differ
  26.          by as much as 20% for the same test configuration. For this
  27.          test, the new version in Pascal from [3] was used. It was
  28.          compiled with Turbo Pascal 6.0 and my own library (see above)
  29.          with all 'optimizations' on.
  30.  
  31.          SAVAGE tests the performance of transcendental function
  32.          evaluation. It is basically a small loop in which the sin,
  33.          cos, arctan, ln, exp, and sqrt functions are combined in a
  34.          single expression. While sin, cos, arctan, and sqrt can be
  35.          evaluated directly with a single 387 coprocessor instruction
  36.          each, ln and exp need additional preprocessing for argument
  37.          reduction and result conversion. According to [14], the Savage
  38.          benchmark was devised by Bill Savage, and is distributed by:
  39.          The Wohl Engine Company, Ltd., 8200 Shore Front Parkway,
  40.          Rockaway Beach, NY 11693, USA. Usually, Savage is programmed
  41.          to make 250,000 passes though the loop. Here only 10,000 loops
  42.          are executed for a total of 60,000 transcendental function
  43.          evaluations. The result is expressed in function evaluations
  44.          per second. SAVAGE source code was taken from [7] and compiled
  45.          with Turbo Pascal 6.0 and my own run-time library (see above).
  46.  
  47.  
  48.          Benchmark results for 387 coprocessors, coprocessor emulators and
  49.          the Intel RapidCAD and Intel 486 CPUs.
  50.  
  51.  
  52.          40 MHz         PEAKFLOP TRNSFORM LLL     Linpack Whetstone Savage
  53.                         MFLOPS   MFLOPS   MFLOPS  MFLOPS  kWhet/sec Func/sec
  54.  
  55.          386, EM87      0.0084   0.0080   0.0060  0.0060         31      502 ##
  56.          386, Franke387 0.0369   0.0295   0.0233  0.0215        164     4002 $$
  57.          386, TP 6 Emu  0.0316   0.0273   0.0200  0.0190        160     3794 %%
  58.          Intel 387DX    0.9204   0.7212   0.3932  0.3211       2428    52677
  59.          ULSI 83C87     1.2093   0.7936   0.3890  0.3120       2528    56926
  60.          IIT 3C87       1.0196   0.7145   0.3834  0.3179       2663    58766
  61.          IIT 3C87,4x4   1.0196   1.7244   0.3834  0.3179       2663    58766 ??
  62.          C&T 38700      1.0722   0.7908   0.4007  0.3222       2837    74906
  63.          Cyrix 387+     1.1305   0.8162   0.3945  0.3208       2946    80322
  64.          Intel RapidCAD 2.2128   1.8931   0.7377  0.5432       4810    86957
  65.          Intel 486      2.4762   2.1335   1.1110  0.8204       6195    98522
  66.  
  67.  
  68.          33.3 MHz       PEAKFLOP TRNSFORM LLL     Linpack Whetstone Savage
  69.                         MFLOPS   MFLOPS   MFLOPS  MFLOPS  kWhet/sec Func/sec
  70.  
  71.          386, EM87      0.0070   0.0040   0.0050  0.0050         26      418 ##
  72.          Franke387      0.0307   0.0246   0.0194  0.0179        137     3335 $$
  73.          386, TP 6 Emu  0.0263   0.0227   0.0167  0.0158        133     3160 %%
  74.          Intel 387DX    0.7647   0.6004   0.3283  0.2676       2046    43860
  75.          ULSI 83C87     1.0097   0.6609   0.3239  0.2598       2089    47431
  76.          IIT 3C87       0.8455   0.5957   0.3198  0.2646       2203    49020
  77.          IIT 3C87,4X4   0.8455   1.4334   0.3198  0.2646       2203    49020 ??
  78.          C&T 38700      0.9455   0.6907   0.3338  0.2700       2376    62565
  79.          Cyrix 387+     0.9286   0.6806   0.3293  0.2669       2435    66890
  80.          Cyrix 83D87    1.013       N/A   0.333   0.273        2550      N/A
  81.          Intel RapidCAD 1.8572   1.5798   0.6072  0.4533       3953    72464
  82.          Intel 486      2.0800   1.7779   0.9387  0.6682       5143    82192
  83.  
  84.  
  85.          For comparison:
  86.  
  87.                         PEAKFLOP TRNSFORM LLL     Linpack Whetstone Savage
  88.                         MFLOPS   MFLOPS   MFLOPS  MFLOPS  kWhet/sec Func/sec
  89.  
  90.          i486DX2-66     4.1601   3.4227   1.6531  1.3010      10655   163934
  91.          i486DX2-50     3.0589   2.6665   1.2537  0.9744       7962   123203
  92.          i387, 20 MHz   0.2253   0.3271   0.1434  0.1171        952    21739 ++
  93.          i387DX, 20 MHz 0.3567   0.4444   0.1484  0.1161       1034    24155 &&
  94.          i80287, 5 MHz  0.0281   0.0310   0.0242  0.0222        150     3261 !!
  95.          i8087,9.54 MHz 0.0636   0.0705   0.0321  0.0219        234     5782 **
  96.  
  97.          HW configuration for test of 387 coprocessors and Intel RapidCAD:
  98.          System A: Motherboard with Forex chip set, 128 kB CPU Cache, 8 MB RAM
  99.  
  100.          HW configuration for test of 486 FPU (extra fan for 40 MHz operation):
  101.          System B: Motherboard with SIS chip set, 256 kB CPU Cache, 8 MB RAM
  102.  
  103.          ## EM87 V1.2 by Ron Kimball is a public domain coprocessor emulator
  104.             that loads as a TSR. It uses INT 7 traps emitted by 80286, 80386
  105.             systems with no coprocessor upon encountering coprocessor
  106.             instructions to catch coprocessor instructions and emulate them.
  107.             Whetstone and Savage benchmarks for this test were compiled
  108.             with the original TP 6.0 library, as EM87 chokes on the 387
  109.             specific FSIN and FCOS instructions used in my own library if
  110.             a 387 is detected. Obviously EM87 identifies itself as a 387,
  111.             but has no support for 387 specific instructions.
  112.          $$ Franke387 is a commercial 387 emulator that is also available in
  113.             a shareware version. For this test, shareware version V2.4 was
  114.             used. Franke387 unlike many other emulators supports all 387
  115.             instructions. It is loaded as a device driver and uses INT 7
  116.             to trap coprocessor instructions.
  117.          %% These benchmarks were run using the built-in coprocessor emulators
  118.             of the TP 6.0 and the MS FORTRAN 5.0 run-time libraries.
  119.          ?? The 3C87 specific F4X4 instruction was used in the vector trans-
  120.             formation benchmark.
  121.          ++ Older motherboard with no chip set (discrete logic), no CPU cache,
  122.             16 MB RAM
  123.          && System A, CPU cache disabled via extended set-up, turbo-switch
  124.             set to half speed (that is, 20 MHz)
  125.          !! 80386 @ 20 MHz / Intel 80287 @ 5 MHz, no CPU cache, 4 MB RAM
  126.             due to the fast CPU used here, performance figures are somewhat
  127.             higher than can be expected for a 80286/287 combination, except
  128.             for the PEAKFLOP benchmark, which is basically coprocessor limited
  129.          ** 8086/8087 system with 640 kB RAM
  130.  
  131.  
  132.          Since neither a Weitek coprocessor nor a compiler that generates
  133.          code for the Weitek chips were available, performance data for
  134.          the Weitek Abacus is given here according to [31,32] and scaled to
  135.          show performance of a 33 MHz system. The benchmarks were compiled
  136.          using highly optimizing 32-bit compilers.
  137.  
  138.                               Single Prec.     Double Prec.    Double Prec.
  139.  
  140.                               3167    4167     3167    4167      387    486
  141.  
  142.          Linpack MFLOPS        1.8     5.0      0.8     3.2      0.4    1.6
  143.          Whetstone kWhet/sec  7470   22700     4900   14000     3290  12300
  144.  
  145.          Note that for the Intel coprocessors, running programs in single
  146.          vs. double precision doesn't provide much of an performance advantage
  147.          since all internal calculations are always done in extended precision.
  148.          Using Weitek coprocessors however, performance nearly doubles when
  149.          switching from double to single precision. For double precision
  150.          calculations using only basic arithmetic, the Weitek Abacus can
  151.          provide performance at twice the level of the respective Intel
  152.          coprocessor (387/486) clocked at the same speed at most.
  153.  
  154.  
  155.          Speed of various coprocessor instructions measured in clock cycles
  156.          as measured with my program 87TIMES. Error is +/- one clock cycle,
  157.          except for the Intel 80287. Times for the 80287 were determined on
  158.          a system with a 20 MHz 80386 and a 5 MHz Intel 80287. Therefore,
  159.          times may differ from a genuine 80286/287 system, especially for
  160.          those instructions that access an operand in memory. Since the
  161.          times are stated as the number of coprocessor clock cycles used,
  162.          the faster 386 which can execute four clock cycles where the 80287
  163.          executes one clock cycle may decrease memory access times as seen
  164.          by the coprocessor.
  165.  
  166.  
  167.                          Intel  Intel  Cyrix Cyrix C&T   ULSI  IIT  Intel Intel
  168.                          i486 RapidCAD 83D87 387+  38700 83C87 3C87 387DX 80387
  169.  
  170.                     FLD1    4      3     14    14    14    18    24    23    26
  171.                     FLDZ    4      3     14    14    14    18    24    23    31
  172.                    FLDPI    7      8     14    15    14    18    24    38    45
  173.                   FLDLG2    7      8     14    14    14    18    24    33    45
  174.                   FLDL2T    7      8     14    14    14    19    24    38    45
  175.                   FLDL2E    7      8     14    14    14    19    24    38    45
  176.                   FLDLN2    7      8     14    14    14    19    24    38    45
  177.                FLD ST(0)    4      4     14    14    14    14    24    20    21
  178.                FST ST(1)    3      4     14    14    14    14    19    18    22
  179.               FSTP ST(0)    4      4     14    14    14    15    19    19    22
  180.               FSTP ST(1)    4      4     15    15    14    15    19    20    22
  181.                FLD ST(1)    4      4     14    14    14    14    24    18    21
  182.               FXCH ST(1)    4      4     14    20    14    19    24    24    27
  183.              FILD [Word]   12     16     33    37    32    42    38    47    62
  184.             FILD [DWord]    8     11     26    26    21    32    28    35    45
  185.             FILD [QWord]    9     15     30    30    25    36    32    34    54
  186.              FLD [DWord]    3      5     26    26    21    23    28    20    25
  187.              FLD [QWord]    3      7     30    30    25    27    32    24    35
  188.              FLD [TByte]    5     11     46    46    46    46    47    46    57
  189.             FBLD [TByte]   83     90     66    86   106   146   197    71   278
  190.              FIST [Word]   31     31     37    40    37    42    51    69    90
  191.             FIST [DWord]   29     30     35    40    35    40    49    66    84
  192.              FST [DWord]    7      7     35    37    32    40    33    37    40
  193.              FST [QWord]    8      9     43    43    39    47    40    45    51
  194.             FISTP [Word]   32     32     42    40    37    43    46    70    90
  195.            FISTP [DWord]   31     31     40    40    35    41    50    67    87
  196.            FISTP [QWord]   29     29     44    44    42    48    56    73    92
  197.             FSTP [DWord]    8      8     38    36    32    41    35    38    43
  198.             FSTP [QWord]    9      9     46    43    39    48    42    46    49
  199.             FSTP [TByte]    8      8     50    45    49    50    48    53    58
  200.            FBSTP [TByte]  170    172     98    98   114   129   218   144   533
  201.                    FINIT   17     31     15    16    15    15    16    16    25
  202.                    FCLEX    7     20     15    16    16    16    16    16    25
  203.                     FCHS    7      8     14    15    14    14    19    30    33
  204.                     FABS    5      5     14    15    14    14    19    30    33
  205.                     FXAM   12     13     14    15    14    14    19    39    43
  206.                     FTST    5      5     19    25    14    24    24    34    38
  207.                   FSTENV   67     82    125   125   124   132   124   159   165
  208.                   FLDENV   44     59    106   106   112   120   106   119   129
  209.                    FSAVE  181    169    355   355   374   361   376   469   511
  210.                   FRSTOR  130    203    358   358   385   372   371   420   456
  211.              FSTSW [mem]    4      5     14    14    14    14    14    14    17
  212.                 FSTSW AX    3      4     12    12    11    11    11    11    14
  213.              FSTCW [mem]    4      5     14    14    13    13    13    14    18
  214.              FLDCW [mem]    4     11     26    26    31    32    27    32    36
  215.            FADD ST,ST(0)    8      9     19    20    19    19    24    24    32
  216.            FADD ST,ST(1)    9      9     19    20    19    18    24    20    32
  217.            FADD ST(1),ST   10     10     19    20    19    18    24    24    37
  218.           FADDP ST(1),ST   11     11     19    19    19    16    24    25    37
  219.             FADD [DWord]    9     10     25    28    22    23    23    21    34
  220.             FADD [QWord]    9     10     32    32    26    27    27    25    38
  221.             FIADD [Word]   20     21     34    34    33    40    40    52    80
  222.            FIADD [DWord]   20     21     27    28    27    30    30    37    61
  223.            FSUB ST(1),ST   10     10     19    20    19    19    24    24    38
  224.           FSUBR ST(1),ST    9     10     19    22    19    19    24    27    38
  225.          FSUBRP ST(1),ST   10     10     19    19    22    20    24    25    38
  226.             FSUB [DWord]   11     12     27    28    27    23    29    27    32
  227.             FSUB [QWord]   11     12     32    32    31    27    33    26    44
  228.             FISUB [Word]   21     21     34    34    34    40    40    52    80
  229.            FISUB [DWord]   21     22     27    28    27    29    30    40    60
  230.            FMUL ST,ST(1)   16     17     19    25    24    24    29    38    57
  231.            FMUL ST(1),ST   16     17     19    24    24    24    29    40    62
  232.           FMULP ST(1),ST   17     17     19    24    24    25    29    40    58
  233.             FIMUL [Word]   22     23     40    40    37    46    46    52    80
  234.            FIMUL [DWord]   22     23     27    28    27    36    35    45    68
  235.             FMUL [DWord]   11     12     27    28    27    28    29    25    45
  236.             FMUL [QWord]   14     15     32    32    31    32    33    37    61
  237.            FDIV ST,ST(0)   73     74     26    40    59    54    54    89   100
  238.            FDIV ST,ST(1)   73     74     36    45    59    54    54    77   100
  239.            FDIV ST(1),ST   73     74     36    45    59    55    54    78   102
  240.           FDIVR ST(1),ST   73     74     36    45    59    54    54    77   102
  241.          FDIVRP ST(1),ST   73     74     36    44    59    55    54    76   106
  242.             FIDIV [Word]   84     85     52    58    75    76    76   105   141
  243.            FIDIV [DWord]   84     85     45    46    65    65    65   101   123
  244.             FDIV [DWord]   73     74     45    46    63    56    59    77   101
  245.             FDIV [QWord]   73     74     50    50    67    60    63    78   103
  246.              FSQRT (0.0)   25     25     19    19    14    19    24    29    37
  247.              FSQRT (1.0)   83     84     36    74    54    89    59   109   132
  248.              FSQRT (L2T)   86     87     36    74    54    89    59   104   137
  249.            FXTRACT (L2T)   17     17     19    19    19    28    79    53    72
  250.            FSCALE (PI,5)   30     30     36    24    24    49    79    59    82
  251.             FRNDINT (PI)   31     31     19    29    24    34    29    49    82
  252.            FPREM (99,PI)   58     59     54    99    44    54    49    79    96
  253.            FPREM1(99,PI)   90     91     54    99    44    59    54   104   121
  254.                     FCOM    5      6     15    20    19    25    19    29    32
  255.                    FCOMP    6      6     15    19    19    25    19    30    33
  256.                   FCOMPP    7      7     15    19    19    25    19    31    40
  257.             FICOM [Word]   16     17     34    34    33    46    34    58    76
  258.            FICOM [DWord]   16     16     21    28    21    35    23    45    57
  259.             FCOM [DWord]    5      6     21    28    22    23    23    27    34
  260.             FCOM [QWord]    5      8     27    32    25    27    27    31    39
  261.               FSIN (0.0)   24     24     14    99    14    19    24    39    43
  262.               FSIN (1.0)  310    313    114   164   144   494   219   509   596
  263.                FSIN (PI)   88     89    118   189    64    64   214   134   152
  264.               FSIN (LG2)  292    295     72    89   139   454   184   449   531
  265.               FSIN (L2T)  299    302    123   179   164   469   214   454   536
  266.               FCOS (0.0)   24     24     19   159    14    19    24    34    42
  267.               FCOS (1.0)  302    305     84   104   139   489   214   459   547
  268.                FCOS (PI)   88     89    154   254    64    64   224   199   232
  269.               FCOS (LG2)  300    303    108   149   139   454   194   504   583
  270.               FCOS (L2T)  307    310    159   239   164   469   224   509   601
  271.            FSINCOS (0.0)   25     25     14    19    19    18    34    38    55
  272.            FSINCOS (1.0)  353    356    124   174   254   493   419   538   636
  273.             FSINCOS (PI)  105    106    162   263    79    68   424   228   277
  274.            FSINCOS (LG2)  340    343    119   159   249   458   359   533   627
  275.            FSINCOS (L2T)  347    350    168   248   274   473   424   538   646
  276.              FPTAN (0.0)   25     25     14    19    19    18    29    38    46
  277.              FPTAN (1.0)  266    269    119   149   184   538   309   323   396
  278.               FPTAN (PI)  145    146    134   228   104   108   304   168   211
  279.              FPTAN (LG2)  244    246     94   129   179   498   274   298   363
  280.              FPTAN (L2T)  247    249    139   219   204   513   304   298   365
  281.             FPATAN (0.0)   38     39     19    24    19    20    29    95    93
  282.             FPATAN (1.0)  294    298    124   159    29   375   604   360   433
  283.              FPATAN (PI)  304    308    139   188   279   360   424   375   472
  284.             FPATAN (LG2)  290    293    128   154   269   365   379   375   448
  285.             FPATAN (L2T)  304    308    144   189   274   359   424   375   468
  286.              F2XM1 (0.0)   25     25     14    14    14    19    24    34    37
  287.              F2XM1 (LN2)  209    211     89   119   169   394   284   299   348
  288.              F2XM1 (LG2)  204    206     78   104   159   379   284   294   337
  289.              FYL2X (1.0)   60     61     36    39    24    75    94   115   127
  290.               FYL2X (PI)  294    297    108   163   249   450   359   395   504
  291.              FYL2X (LG2)  311    314    108   159   249   460   339   410   518
  292.              FYL2X (L2T)  293    296    108   164   249   439   359   390   501
  293.            FYL2XP1 (LG2)  334    337     99   169   234   460   284   435   538
  294.  
  295.  
  296.  
  297.                                          80386 +   80386 +  80386 +
  298.                             Intel Intel  Franke387 TP 6.0   EM87
  299.                             8087  80287  Emulator  Emulator Emulator
  300.  
  301.               FSTP ST(0) |   26     54     507       358      2115
  302.                     FLD1 |   26     55     481       422      1626
  303.                     FLDZ |   21     53     480       416      1646
  304.                    FLDPI |   26     55     486       443      1626
  305.                   FLDLG2 |   26     56     486       423      1626
  306.                   FLDL2T |   26     55     486       440      1626
  307.                   FLDL2E |   26     53     486       423      1626
  308.                   FLDLN2 |   26     55     486       441      1626
  309.                FLD ST(0) |   31     55     493       362      1851
  310.                FST ST(1) |   26     54     489       355      1931
  311.               FSTP ST(1) |   21     55     507       356      2116
  312.                FLD ST(1) |   26     55     493       362      1852
  313.               FXCH ST(1) |   21     57     497       486      2187
  314.              FILD [Word] |   58     90     667       712      2259
  315.             FILD [DWord] |   64     74     608       812      2164
  316.             FILD [QWord] |   74     93     652       707      2971
  317.              FLD [DWord] |   49     44     633       473      2077
  318.              FLD [QWord] |   54     57     641       524      2336
  319.              FLD [TByte] |   59     45     607       492      2063
  320.             FBLD [TByte] |  309    310    2019      1512     17827
  321.              FIST [Word] |   79     72     854       766      2418
  322.             FIST [DWord] |   84     80     865       518      2325
  323.              FST [DWord] |   89     85     686       441      2200
  324.              FST [QWord] |   99     92     703       516      2481
  325.             FISTP [Word] |   79     80     864       794      2620
  326.            FISTP [DWord] |   79     81     879       541      2523
  327.            FISTP [QWord] |   88     75     904       916      3226
  328.             FSTP [DWord] |   89     75     713       467      2400
  329.             FSTP [QWord] |   93     72     732       538      2678
  330.             FSTP [TByte] |   49     21     685       467      2124
  331.            FBSTP [TByte] |  528    472    3305      1555     27013
  332.                    FINIT |   11     10     742       641      1369
  333.                    FCLEX |   11     10     440       323       912
  334.                     FCHS |   21     54     460       354      1744
  335.                     FABS |   21     54     456       349      1738
  336.                     FXAM |   21     54     481       380      1551
  337.                     FTST |   51     75     585       386      2721
  338.                   FSTENV |   54     57     928       519      2104
  339.                   FLDENV |   48     50    1125       450      1631
  340.                    FSAVE |  214    244    1949       976      2749
  341.                   FRSTOR |  209    227    2182       657      2225
  342.              FSTSW [mem] |   28     10     516       401      1189
  343.                 FSTSW AX |  N/A     55     451       N/A       N/A
  344.              FSTCW [mem] |   28     10     506       359      1167
  345.              FLDCW [mem] |   19     47     524       437      1584
  346.            FADD ST,ST(0) |   86    128     643       706      2805
  347.            FADD ST,ST(1) |   85    116     707       808      3093
  348.            FADD ST(1),ST |   92    131     664       812      3146
  349.           FADDP ST(1),ST |   92    129     704       799      3143
  350.             FADD [DWord] |  105    122     874       969      3139
  351.             FADD [QWord] |  115    122     888      1021      3396
  352.             FIADD [Word] |  115    122     940      1211      3330
  353.            FIADD [DWord] |  125    122     882      1297      3215
  354.            FSUB ST(1),ST |   88    130     738       817      3156
  355.           FSUBR ST(1),ST |   96    132     740       868      3004
  356.          FSUBRP ST(1),ST |   99    132     733       805      3301
  357.             FSUB [DWord] |  119    122     918      1018      3127
  358.             FSUB [QWord] |  129    123     932      1070      3632
  359.             FISUB [Word] |  115    123     977      1081      3802
  360.            FISUB [DWord] |  125    125     940       980      4161
  361.            FMUL ST,ST(1) |  145    151     810      1368      3924
  362.            FMUL ST(1),ST |  145    151     817      1377      3962
  363.           FMULP ST(1),ST |  148    168     840      1365      4164
  364.             FIMUL [Word] |  132    151    1039      1517      4039
  365.            FIMUL [DWord] |  141    151     980      1643      3976
  366.             FMUL [DWord] |  125    123     948      1480      3445
  367.             FMUL [QWord] |  175    192     991      1602      4416
  368.            FDIV ST,ST(0) |  201    207     726      1536      9789
  369.            FDIV ST,ST(1) |  203    218     808      1658     10332
  370.            FDIV ST(1),ST |  207    214     825      1655     10342
  371.           FDIVR ST(1),ST |  201    206     819      1806     10213
  372.          FDIVRP ST(1),ST |  201    205     845      1803     10409
  373.             FIDIV [Word] |  237    227     980      1779     11225
  374.            FIDIV [DWord] |  246    227     944      1680     11572
  375.             FDIV [DWord] |  229    226     893      1722     10577
  376.             FDIV [QWord] |  236    227     993      1777     10829
  377.              FSQRT (0.0) |   21     57     512       382      1755
  378.              FSQRT (1.0) |  186    206    1106      2504     37836
  379.              FSQRT (L2T) |  186    207    1398      2467     37925
  380.            FXTRACT (L2T) |   51     56     726       571      3326
  381.            FSCALE (PI,5) |   41     56     817       443      3194
  382.             FRNDINT (PI) |   51     58     808       800      7092
  383.            FPREM (99,PI) |   81    131    1696       941      4098
  384.            FPREM1(99,PI) |  N/A    N/A    1625       N/A       N/A
  385.                     FCOM |   56     75     582       483      2799
  386.                    FCOMP |   61     92     616       485      2983
  387.                   FCOMPP |   61     90     661       476      3198
  388.             FICOM [Word] |   79     77     808       861      3654
  389.            FICOM [DWord] |   89     77     750       964      3684
  390.             FCOM [DWord] |   74     75     741       625      3643
  391.             FCOM [QWord] |   74     76     754       667      3771
  392.               FSIN (0.0) |  N/A    N/A     639       N/A       N/A
  393.               FSIN (1.0) |  N/A    N/A    4640       N/A       N/A
  394.                FSIN (PI) |  N/A    N/A    2488       N/A       N/A
  395.               FSIN (LG2) |  N/A    N/A    3911       N/A       N/A
  396.               FSIN (L2T) |  N/A    N/A    3767       N/A       N/A
  397.               FCOS (0.0) |  N/A    N/A     740       N/A       N/A
  398.               FCOS (1.0) |  N/A    N/A    4777       N/A       N/A
  399.                FCOS (PI) |  N/A    N/A    2557       N/A       N/A
  400.               FCOS (LG2) |  N/A    N/A    4176       N/A       N/A
  401.               FCOS (L2T) |  N/A    N/A    3905       N/A       N/A
  402.            FSINCOS (0.0) |  N/A    N/A     714       N/A       N/A
  403.            FSINCOS (1.0) |  N/A    N/A    6049       N/A       N/A
  404.             FSINCOS (PI) |  N/A    N/A    4091       N/A       N/A
  405.            FSINCOS (LG2) |  N/A    N/A    5640       N/A       N/A
  406.            FSINCOS (L2T) |  N/A    N/A    5405       N/A       N/A
  407.              FPTAN (0.0) |   41     58     752      8381      2324
  408.              FPTAN (1.0) |  581    582    6366     10817     29824
  409.               FPTAN (PI) |  606    587    4388     12410      2300
  410.              FPTAN (LG2) |  516    513    5939     12502     26770
  411.              FPTAN (L2T) |  576    586    5723     12483      2301
  412.             FPATAN (0.0) |   41     55     616      1208     10578
  413.             FPATAN (1.0) |  736    736    1426     13446     34208
  414.              FPATAN (PI) |  206    207   12835     13305     46903
  415.             FPATAN (LG2) |  756    736   12490     13319     41312
  416.             FPATAN (L2T) |  206    204   12922     13364     50149
  417.              F2XM1 (0.0) |   16     56     563       723      1722
  418.              F2XM1 (LN2) |  631    624    4178     11070     33823
  419.              F2XM1 (LG2) |  611    585    4798     11116     32163
  420.              FYL2X (1.0) |   56     57     961      1214      4327
  421.               FYL2X (PI) |  946    961    8987     12858     40148
  422.              FYL2X (LG2) | 1081   1038    8933     12748     46821
  423.              FYL2X (L2T) |  926    886    8982     12712     38986
  424.            FYL2XP1 (LG2) | 1026   1037   10485     11867     44708
  425.  
  426.          The Weitek 3167 and 4167 coprocessors only implement the basic
  427.          arithmetic functions (add, subtract, multiply, divide, square
  428.          root) in hardware. Transcendental functions are implemented
  429.          by means of a software library supplied by Weitek that uses
  430.          the Weitek hardware to approximate the transcendental functions
  431.          with polynomial and rational approximations. The clock cycle
  432.          timings for the transcendental functions are average values,
  433.          since execution time differs with the value of argument. The
  434.          speed of transcendental functions for the 4167 is estimated
  435.          based on the numbers in [31,33], from which this timing
  436.          information has been extracted.
  437.  
  438.  
  439.          Execution time for floating-point operations in clock cycles on
  440.          Weitek coprocessors
  441.  
  442.                   Single Precision         Double Precision
  443.  
  444.                   3167       4167          3167        4167
  445.  
  446.          ABS         3          2             3           2
  447.          NEG         6          2             6           2
  448.          ADD         6          2             6           2
  449.          SUB         6          2             6           2
  450.          SUBR        6          2             6           2
  451.          MUL         6          2            10           3
  452.          DIVR       38         17            66          31
  453.          SQRT       60         17           118          31
  454.          SIN       146        ~50           292        ~100
  455.          COS       140        ~50           285        ~100
  456.          TAN       188        ~60           340        ~110
  457.          EXP       179        ~60           401        ~130
  458.          LOG       171        ~60           365        ~120
  459.          F->ASCII 1000        N/A          1700         N/A  //
  460.          ASCII->F 1100        N/A          1800         N/A  //
  461.  
  462.          // rough average of the timings given for different numeric
  463.             formats by Weitek. Note that these conversions routines
  464.             do much more work than the FBLD and FBSTP instructions
  465.             provided by the 80x87 coprocessors. FBLD and FBSTP are
  466.             useful for conversion routines but quite a bit of additional
  467.             code is need for this purpose.
  468.  
  469.  
  470.          Accuracy
  471.  
  472.          The IEEE-754 Standard for Binary Floating-Point Arithmetic [10,11]
  473.          is fully implemented by Intel's 387 coprocessor [17]. Among other
  474.          things, this means that the add, subtract, multiply, divide,
  475.          remainder, and square root operations always deliver the 'exact'
  476.          result. By exact it is meant that the coprocessor always delivers
  477.          the machine number closest to the real result, which may not
  478.          be representable exactly in the available numeric format. The
  479.          80387 implements the single, double, and double extended formats
  480.          as specified in the standard as well as all functions required
  481.          by it [17]. Note that earlier Intel coprocessors (the 8087 and
  482.          the 80287) comply with a draft version of the standard that differs
  483.          from the final version. These chips came out before the IEEE-754
  484.          standard was finally accepted in 1985. As in the 80387, the basic
  485.          arithmetic in the 8087 and the 80287 is exact in the sense that
  486.          the computed result is always the machine number closest to the
  487.          real result. However, there are some differences regarding certain
  488.          operands like infinities and some operations like the remainder are
  489.          defined differently. Some instructions have been added in the 80387,
  490.          most notably the FSIN and FCOS operations. The argument range for
  491.          some transcendental function has been extended [17]. Note that the
  492.          IEEE-754 standard says nothing about the quality of the implementation
  493.          of transcendental functions like sin, cos, tan, arctan, log. Intel
  494.          uses a modified CORDIC [18,19] technique to compute the transcendental
  495.          functions. Intel claims that maximum error in the 8087, 80287, and
  496.          80387 for all transcendental functions does not exceeed two bits
  497.          in the mantissa of the double extended format, which features 64
  498.          mantissa bits for an accuracy of approximately 19 decimal places
  499.          [22,23]. This claim has been independently verified by a competing
  500.          vendor [13]. This means that at least 62 of the 64 mantissa bits
  501.          in a transcendental function result are correct.
  502.  
  503.          The Weitek Abacus 3167 and 4167 are 'mostly compatible' with
  504.          IEEE-754 [31,32,33]. They support the single precision and double
  505.          precision numeric formats formats described in the standard as
  506.          well as the four rounding modes required by it. However, due to
  507.          the need for extremely high speed operation, some of the finer
  508.          points of IEEE-754 have not been implemented. One of the most
  509.          notable omissions is the missing support for denormal numbers.
  510.          Denormals are always flushed to zero.
  511.  
  512.          The 387 clone makers claim 100% compatibility with Intel's 80387.
  513.          So one would expect the same accuracy from their chips. For example,
  514.          on the packaging of the IIT 3C87 it says that ".. the requirements
  515.          of ANSI/IEEE standards are fulfilled and exceeded". Cyrix states
  516.          that their 83D87 complies fully with the IEEE-754 standard [12].
  517.          Cyrix delivers with their copocessors some diagnostic software.
  518.          This includes the program IEEETEST which is based on the IEEE test
  519.          vectors from the Ph.D. thesis of Jerome T. Coonen [9]. A test using
  520.          the IEEE test vectors has also been included into the RUNDIAG
  521.          program on the Intel RapidCAD diagnostic disk. Rather than performing
  522.          random tests, the test vectors check specific cases that may
  523.          be hard to get right. Each test vector specifies the operation
  524.          to be performed, the operands, precision and rounding mode to be
  525.          used, and the result (including flags set) to be expected according
  526.          to IEEE-754. I ran IEEETEST on all the available coprocessors/FPUs.
  527.          The Intel 486, Intel RapidCAD, Intel 387, Intel 387DX, Cyrix 83D87,
  528.          and the Cyrix 387+ passed with no errors. The ULSI 83C87 showed
  529.          some minor flaws in the FCOM, FDIV, FMUL, and FSCALE operations,
  530.          getting flag errors in about 1% of the tested cases, but no
  531.          computational errors. However, for the IIT 3C87, the IEEETEST
  532.          program showed flag *and* some computational errors (that is, wrong
  533.          results) for all tested operations except FXTRACT and FCHS. The Intel
  534.          80287 shows numerous errors, but this it not surprising, since the
  535.          80287 does not comply with IEEE-754 but with an earlier draft of that
  536.          standard, so it does some thing differently than required by the final
  537.          version of the standard.
  538.  
  539.          Although IEEETEST is written in Turbo Pascal, the coprocessor
  540.          emulator in the TP 6.0 library could not be tested since IEEETEST
  541.          was compiled with the $E- switch excluding the emulator from
  542.          program code. The public domain emulator EM87 could be tested, but
  543.          hung in the last test which checks the implementation of the
  544.          remainder operation. This is probably caused by some bug in the
  545.          emulation of the FPREM instruction tested in this test. It is
  546.          interesting to note how the error profile of EM87 matches exactly
  547.          that of the Intel 80287, so it can be assumed that EM87 is a very
  548.          good emulation of the 80287. The Franke387 V2.4 emulator hung in
  549.          the division test quite early in IEEETEST. The tests performed
  550.          up to the division test reported several errors.
  551.  
  552.  
  553.  
  554.          Explanatory text printed at the start of the IEEETEST program:
  555.  
  556.          JT Coonen's 1984 UC Berkeley Ph.D. thesis centers around his
  557.          activities as a member of the floating-point working group that
  558.          defined the IEEE 754-1985 Standard for Binary Floating-Point
  559.          Arithmetic. Appendix C of his thesis presents FPTEST, a Pascal
  560.          program written by J Thomas and JT Coonen. IEEETEST is a port of
  561.          FPTEST and runs on PCs whose math coprocessor accepts 80387
  562.          compatible floating-point instructions.
  563.  
  564.          IEEETEST reads test vectors from the file TESTVECS and compares
  565.          the answer returned by the math coprocessor with the answer listed
  566.          in the test vector. If these answers differ an 'F' is displayed,
  567.          otherwise a '.'is displayed. Answers can differ due to two types
  568.          of failures: numeric failures or flag failures. Numeric failures
  569.          occur when the computed answer has the wrong value. Flag failures
  570.          occur when the status (invalid operation, divide by zero, underflow,
  571.          overflow, inexact) is incorrectly identified.
  572.  
  573.          TESTVECS is the concatenation of unmodified versions of all the
  574.          test vectors distributed by UC Berkeley. The test data base is
  575.          copyrighted by UC Berkeley (1985) and is being distributed with
  576.          their permission. FPTEST and the test data base can be obtained
  577.          by asking for 'IEEE-754 Test Vector' from UC Berkeley, Electrical
  578.          Engineering and Computer Science, Industrial Liaison Program,
  579.          479 Corey Hall, Berkeley, CA, 94720 (415)643-6687.
  580.  
  581.          The initial version of this test data base for the proposed IEEE
  582.          754 binary floating-point standard (draft 8.0) was developed for
  583.          Zilog, Inc. and was donated to the floating-point working group
  584.          for dissemination. Errors in or additions to the distributed data
  585.          base should be reported to the agency of distribution, with copies
  586.          to Zilog, Inc., 1315 Dell Avenue, Campbell, CA, 95008.
  587.  
  588.  
  589.          IEEETEST output for Intel 80387, Intel 387DX, Intel 486, C&T 38700,
  590.                              Cyrix 83D87, Cyrix 387+, Intel RapidCAD
  591.  
  592.          IEEE-754 Test Vector  Precisions: S=Single D=Double E=Double Extended
  593.                                |     TESTS     | numeric TYPE OF FAILURE flag
  594.                 Operation Code | Passed Failed |    S    D    E |   S    D    E
  595.          ----------------------------------------------------------------------
  596.            Absolute Value    A |    216      0 |    0    0    0 |   0    0    0
  597.                  Addition    + |   3528      0 |    0    0    0 |   0    0    0
  598.                Comparison    C |   4320      0 |    0    0    0 |   0    0    0
  599.                 Copy Sign    @ |   1488      0 |    0    0    0 |   0    0    0
  600.                  Division    / |   4311      0 |    0    0    0 |   0    0    0
  601.             Fraction Part    F |    624      0 |    0    0    0 |   0    0    0
  602.                      Logb    L |    960      0 |    0    0    0 |   0    0    0
  603.            Multiplication    * |   3978      0 |    0    0    0 |   0    0    0
  604.                  Negation    - |    216      0 |    0    0    0 |   0    0    0
  605.                Next After    N |   2832      0 |    0    0    0 |   0    0    0
  606.          Round to Integer    I |    558      0 |    0    0    0 |   0    0    0
  607.                     Scalb    S |    948      0 |    0    0    0 |   0    0    0
  608.               Square Root    V |    744      0 |    0    0    0 |   0    0    0
  609.               Subtraction    - |   3528      0 |    0    0    0 |   0    0    0
  610.                 Remainder    % |   2984      0 |    0    0    0 |   0    0    0
  611.                         Totals |  31235      0 |
  612.  
  613.  
  614.          IEEETEST output for ULSI 83C87 (manufactured 91/48)
  615.  
  616.          IEEE-754 Test Vector  Precisions: S=Single D=Double E=Double Extended
  617.                                |     TESTS     | numeric TYPE OF FAILURE flag
  618.                 Operation Code | Passed Failed |    S    D    E |   S    D    E
  619.          ----------------------------------------------------------------------
  620.            Absolute Value    A |    216      0 |    0    0    0 |   0    0    0
  621.                  Addition    + |   3528      0 |    0    0    0 |   0    0    0
  622.                Comparison    C |   4312      8 |    0    0    0 |   0    0    8
  623.                 Copy Sign    @ |   1488      0 |    0    0    0 |   0    0    0
  624.                  Division    / |   4250     61 |    0    0    0 |  28   28    5
  625.             Fraction Part    F |    624      0 |    0    0    0 |   0    0    0
  626.                      Logb    L |    960      0 |    0    0    0 |   0    0    0
  627.            Multiplication    * |   3936     42 |    0    0    0 |  19   19    4
  628.                  Negation    - |    216      0 |    0    0    0 |   0    0    0
  629.                Next After    N |   2828      4 |    0    0    0 |   0    0    4
  630.          Round to Integer    I |    558      0 |    0    0    0 |   0    0    0
  631.                     Scalb    S |    930     18 |    0    0    0 |   6    6    6
  632.               Square Root    V |    744      0 |    0    0    0 |   0    0    0
  633.               Subtraction    - |   3528      0 |    0    0    0 |   0    0    0
  634.                 Remainder    % |   2984      0 |    0    0    0 |   0    0    0
  635.                         Totals |  31102    133 |
  636.  
  637.  
  638.          IEEETEST output for ULSI 83S87 (manufactured 92/17)
  639.          (data kindly supplied by Bengt Ask, f89ba@efd.lth.se)
  640.  
  641.          IEEE-754 Test Vector  Precisions: S=Single D=Double E=Double Extended
  642.                                |     TESTS     | numeric TYPE OF FAILURE flag
  643.                 Operation Code | Passed Failed |    S    D    E |   S    D    E
  644.          ----------------------------------------------------------------------
  645.            Absolute Value    A |    216      0 |    0    0    0 |   0    0    0
  646.                  Addition    + |   3528      0 |    0    0    0 |   0    0    0
  647.                Comparison    C |   4320      0 |    0    0    0 |   0    0    0
  648.                 Copy Sign    @ |   1488      0 |    0    0    0 |   0    0    0
  649.                  Division    / |   4296     15 |    0    0    0 |   5    5    5
  650.             Fraction Part    F |    624      0 |    0    0    0 |   0    0    0
  651.                      Logb    L |    960      0 |    0    0    0 |   0    0    0
  652.            Multiplication    * |   3966     12 |    0    0    0 |   4    4    4
  653.                  Negation    - |    216      0 |    0    0    0 |   0    0    0
  654.                Next After    N |   2828      4 |    0    0    0 |   0    0    4
  655.          Round to Integer    I |    558      0 |    0    0    0 |   0    0    0
  656.                     Scalb    S |    930     18 |    0    0    0 |   6    6    6
  657.               Square Root    V |    744      0 |    0    0    0 |   0    0    0
  658.               Subtraction    - |   3528      0 |    0    0    0 |   0    0    0
  659.                 Remainder    % |   2984      0 |    0    0    0 |   0    0    0
  660.                         Totals |  31102     45 |
  661.  
  662.  
  663.          IEEETEST output for IIT 3C87 (manufactured 92/20)
  664.  
  665.          IEEE-754 Test Vector  Precisions: S=Single D=Double E=Double Extended
  666.                                |     TESTS     | numeric TYPE OF FAILURE flag
  667.                 Operation Code | Passed Failed |    S    D    E |   S    D    E
  668.          ----------------------------------------------------------------------
  669.            Absolute Value    A |    200     16 |    0    0   16 |   0    0    0
  670.                  Addition    + |   3336    192 |    0    0  128 |   0    0   96
  671.                Comparison    C |   4224     96 |    0    0   96 |   0    0    0
  672.                 Copy Sign    @ |   1488      0 |    0    0    0 |   0    0    0
  673.                  Division    / |   4159    152 |    0    0  124 |   0    0  116
  674.             Fraction Part    F |    600     24 |    0    0   24 |   0    0   24
  675.                      Logb    L |    960      0 |    0    0    0 |   0    0    0
  676.            Multiplication    * |   3702    276 |    0    0  248 |   0    0  100
  677.                  Negation    - |    200     16 |    0    0   16 |   0    0    0
  678.                Next After    N |   2248    584 |    0    0  584 |   0    0  168
  679.          Round to Integer    I |    542     16 |    0    0    4 |   0    0   16
  680.                     Scalb    S |    874     74 |    5    5   44 |   8    8   20
  681.               Square Root    V |    688     56 |    0    0   56 |   0    0   56
  682.               Subtraction    - |   3336    192 |    0    0  128 |   0    0   96
  683.                 Remainder    % |   2844    140 |    0    0  140 |   0    0  116
  684.                         Totals |  29401   1834 |
  685.  
  686.  
  687.          IEEETEST output for Intel 80287 run together with a 80386 CPU
  688.  
  689.          IEEE-754 Test Vector  Precisions: S=Single D=Double E=Double Extended
  690.                                |     TESTS     | numeric TYPE OF FAILURE flag
  691.                 Operation Code | Passed Failed |    S    D    E |   S    D    E
  692.          ----------------------------------------------------------------------
  693.            Absolute Value    A |    216      0 |    0    0    0 |   0    0    0
  694.                  Addition    + |   2886    642 |   16   16  112 | 174  174  174
  695.                Comparison    C |      0   4320 | 1324 1324 1324 |1332 1332 1332
  696.                 Copy Sign    @ |   1488      0 |    0    0    0 |   0    0    0
  697.                  Division    / |   3777    534 |   18   18   37 | 169  169  165
  698.             Fraction Part    F |    552     72 |   24   24   24 |  24   24   24
  699.                      Logb    L |    900     60 |   12   12   12 |  20   20   20
  700.            Multiplication    * |   2944   1034 |  105  105  197 | 303  303  231
  701.                  Negation    - |    216      0 |    0    0    0 |   0    0    0
  702.                Next After    N |    348   2484 |  768  768  768 | 504  504  526
  703.          Round to Integer    I |    546     12 |    0    0    0 |   4    4    4
  704.                     Scalb    S |    663    285 |   45   43   26 | 102   98   46
  705.               Square Root    V |    720     24 |    4    4    4 |   8    8    8
  706.               Subtraction    - |   2886    642 |   16   16  112 | 174  174  174
  707.                 Remainder    % |    708   2276 |  768  768  560 | 216  216  216
  708.                         Totals |  18850  12385 |
  709.  
  710.  
  711.          IEEETEST output for EM87 coprocessor emulator run on an Intel 386 CPU
  712.  
  713.          IEEE-754 Test Vector  Precisions: S=Single D=Double E=Double Extended
  714.                                |     TESTS     | numeric TYPE OF FAILURE flag
  715.                 Operation Code | Passed Failed |    S    D    E |   S    D    E
  716.          ----------------------------------------------------------------------
  717.            Absolute Value    A |    216      0 |    0    0    0 |   0    0    0
  718.                  Addition    + |   2886    642 |   16   16  112 | 174  174  174
  719.                Comparison    C |      0   4320 | 1324 1324 1324 |1332 1332 1332
  720.                 Copy Sign    @ |   1488      0 |    0    0    0 |   0    0    0
  721.                  Division    / |   3777    534 |   18   18   37 | 169  169  165
  722.             Fraction Part    F |    552     72 |   24   24   24 |  24   24   24
  723.                      Logb    L |    900     60 |   12   12   12 |  20   20   20
  724.            Multiplication    * |   2944   1034 |  105  105  197 | 303  303  231
  725.                  Negation    - |    216      0 |    0    0    0 |   0    0    0
  726.                Next After    N |    348   2484 |  768  768  768 | 504  504  526
  727.          Round to Integer    I |    546     12 |    0    0    0 |   4    4    4
  728.                     Scalb    S |    663    285 |   45   43   26 | 102   98   46
  729.               Square Root    V |    720     24 |    4    4    4 |   8    8    8
  730.               Subtraction    - |   2886    642 |   16   16  112 | 174  174  174
  731.  
  732.  
  733.          To complement the checks done by IEEETEST I wrote some short
  734.          programs DENORMTS, RCTRL, PCTRL in Turbo Pascal 6.0 that test
  735.          the following features:
  736.  
  737.          1. support for denormals in all precisions (single, double, extended)
  738.          2. support for the four IEEE rounding modes (up, down, nearest, chop)
  739.          3. support for precision control
  740.  
  741.          Note that passing all tests is required for IEEE conformance and
  742.          required for compatibility with Intel's coprocessors. Precision
  743.          control forces the results of the FADD, FSUB, FMUL, FDIV, and FSQRT
  744.          instruction to be rounded to the specified precision (single, double,
  745.          double extended). This feature is provided to obtain compatibility
  746.          with certain programming languages [17]. By specifying lower
  747.          precision, one effectively nullifies the advantages of extended
  748.          precision intermediate results. The IEEE-754 standard for floating
  749.          point arithmetic demands that processors/fp-packages that can not
  750.          store the result of operations *directly* to single and double
  751.          precision location must provide precision control. The programs
  752.          that test precision control and rounding control are designed to
  753.          return a different result for each of the modes for the same sequence
  754.          of operation. The source code of the programs can be found in appendix
  755.          A. The Intel 8087 and 80287 were not tested with DENORMTS since Turbo
  756.          Pascal does not support extended precision denormals on 8087/80287
  757.          processors, so the denormal test fails anyway. The 8087 and 287
  758.          pass the RCTRL and PCTRL tests, though.
  759.  
  760.  
  761.          These are the results for the Intel 387, Intel 387DX, Intel 486,
  762.          Intel RapidCAD, Cyrix 83D87, Cyrix 387+, C&T 38700, and the EM87
  763.          emulator (on a 80386 machine)
  764.  
  765.          Precision Control           SINGLE   1.13311278820037842E+0000
  766.                                      DOUBLE   1.23456789006442125E+0000
  767.                                      EXTENDED 1.23456789012337585E+0000
  768.  
  769.          Rounding Control            NEAREST -1.23427629010100635E+0100
  770.                                      DOWN    -1.23427623555772409E+0100
  771.                                      UP      -1.23457760966801097E+0100
  772.                                      CHOP    -1.23397493540770643E+0100
  773.  
  774.          Denormal support
  775.  
  776.          SINGLE denormals supported
  777.          SINGLE denormal prints as:    4.60943116855005E-0041
  778.          Denormal should be printed as 4.60943...E-0041
  779.  
  780.          DOUBLE denormals supported
  781.          DOUBLE denormal prints as:    8.75000000000016E-0311
  782.          Denormal should be printed as 8.75...E-0311
  783.  
  784.          EXTENDED denormals supported
  785.          EXTENDED denormal prints as:  1.31640625000000E-4934
  786.          Denormal should be printed as 1.3164...E-4934
  787.  
  788.  
  789.          These are the results for the ULSI 83C87
  790.  
  791.          Precision Control           SINGLE   1.23456789012337585E+0000
  792.                                      DOUBLE   1.23456789012337585E+0000
  793.                                      EXTENDED 1.23456789012337585E+0000
  794.  
  795.          Rounding Control            NEAREST -1.23427629010100635E+0100
  796.                                      DOWN    -1.23427623555772409E+0100
  797.                                      UP      -1.23457760966801097E+0100
  798.                                      CHOP    -1.23397493540770643E+0100
  799.  
  800.          Denormal support
  801.  
  802.          SINGLE denormals supported
  803.          SINGLE denormal prints as:    4.60943116855005E-0041
  804.          Denormal should be printed as 4.60943...E-0041
  805.  
  806.          DOUBLE denormals supported
  807.          DOUBLE denormal prints as:    8.75000000000016E-0311
  808.          Denormal should be printed as 8.75...E-0311
  809.  
  810.          EXTENDED denormals supported
  811.          EXTENDED denormal prints as:  1.31640625000000E-4934
  812.          Denormal should be printed as 1.3164...E-4934
  813.  
  814.  
  815.          These are the results for the IIT 3C87
  816.  
  817.          Precision Control           SINGLE   1.13311278820037842E+0000
  818.                                      DOUBLE   1.23456789006442125E+0000
  819.                                      EXTENDED 1.23456789012337585E+0000
  820.  
  821.          Rounding Control            NEAREST -1.23427629010100635E+0100
  822.                                      DOWN    -1.23427623555772409E+0100
  823.                                      UP      -1.23457760966801097E+0100
  824.                                      CHOP    -1.23397493540770643E+0100
  825.  
  826.          Denormal support
  827.  
  828.          SINGLE denormals supported
  829.          SINGLE denormal prints as:    4.60943116855005E-0041
  830.          Denormal should be printed as 4.60943...E-0041
  831.  
  832.          DOUBLE denormals supported
  833.          DOUBLE denormal prints as:    8.75000000000016E-0311
  834.          Denormal should be printed as 8.75...E-0311
  835.  
  836.          EXTENDED denormals not supported
  837.  
  838.  
  839.          These are the results for the TP 6.0 coprocessor emulator:
  840.  
  841.          Precision Control           SINGLE   1.23456789012351396E+0000
  842.                                      DOUBLE   1.23456789012351396E+0000
  843.                                      EXTENDED 1.23456789012351396E+0000
  844.  
  845.          Rounding Control            NEAREST -1.23457766383395931E+0100
  846.                                      DOWN    -1.23457766383395931E+0100
  847.                                      UP      -1.23457766383395931E+0100
  848.                                      CHOP    -1.23457766383395931E+0100
  849.  
  850.          Denormal support
  851.  
  852.          SINGLE denormals not supported
  853.          DOUBLE denormals not supported
  854.          EXTENDED denormals not supported
  855.  
  856.  
  857.          The test results show that the IIT 3C87 does not conform to the
  858.          IEEE-754 floating-point standard in that it does not support
  859.          denormals in double extended precision. The ULSI 83C87 does not
  860.          conform to that standard in that it does not support precision
  861.          control, but uses double extended precision for all operations.
  862.          The TP 6.0 emulator supports neither precision control, rounding
  863.          control nor support for any denormals. In addition, its basic
  864.          arithmetic operations do not seem to conform to the IEEE standard
  865.          as the results of the test programs differ from that of any result
  866.          computed by a coprocessor for any mode.
  867.  
  868.  
  869.          With regard to the accuracy of transcendental functions, Cyrix
  870.          claims that the relative error of the transcendental functions
  871.          on the 83D87 never exceeds 0.5 units in the last place (0.5 ULP)
  872.          of the double extended format [13]. This means that the maximum
  873.          relative error is below 2**-64, while Intel's published error
  874.          limit is 2**-62. While Intel uses a modified CORDIC algorithm
  875.          [18,19] to compute the transcendental functions, Cyrix uses
  876.          rational approximations that utilize a very fast array multiplier.
  877.          For an explanation why this approach is superior to CORDIC with
  878.          todays technology, see [61]. Also, Cyrix uses an internal 75 bit
  879.          data path for the mantissa [15], so intermediate computations in
  880.          the generation of transcendental function values will enjoy some
  881.          additional accuracy over the 64 bits provided by the double
  882.          extended format. Using 75 mantissa bits also provides an advantage
  883.          over other coprocessors like the Intel 387DX and ULSI 83C87 which
  884.          use only a 68 bit data path for the mantissa [58,59]. Note that a
  885.          maximum relative error of 0.5 ULP for the Cyrix coprocessor does
  886.          not mean that it returns the 'exact' result (machine number closest
  887.          to infinitely precise result) all the time. Just consider the case
  888.          where the infinitely precise result of a transcendental function
  889.          falls nearly half way between two machine numbers. A relative error
  890.          of 0.5 ULP can cause the result to be either of the numbers after
  891.          rounding, depending on the direction of the error. But the 83D87
  892.          should deliver results that never differ from the 'exact' result
  893.          by more than one ULP. Please note that the claim of relative error
  894.          being below 0.5 ULPs is slightly exaggerated. 0.6 ULPs would be a
  895.          more realistic error limit. Imagine that the infinitely precise
  896.          result for some argument to a transcendental was xxx..xxx1001...
  897.          (where the xxx...xxx represent the first 64 bits of the result),
  898.          but that the coprocessor computes the result as xxx..xxx0111 and
  899.          then round this down to xxx..xxx0000. Then the relative error is
  900.          (1001b-0b)/1000b = 0.5625 ULPs. I tested some of the transcendental
  901.          functions of the Cyrix 387+ and found the relative error to be
  902.          always below 0.6 ULPs. Cyrix also claims that its transcendental
  903.          functions satisfy the monotonicity criterion [13], a claim not
  904.          made by any of the competitors, which does not mean that the
  905.          transcendental functions on the other 387 compatibles may not be
  906.          monotonic, too. Monotonicity means that for all x1 > x2, it always
  907.          follows that f(x1) >= f(x2) for an increasing function like sin
  908.          on [0..pi/4]. Likewise, for a decreasing function like cos on
  909.          [0..pi/4], for all x1 > x2, it follows that f(x1) <= f(x2).
  910.  
  911.          The Weitek Abacus 3167 and 4167 implement only the basic arithmetic
  912.          operations (add, subtract, negate, multiply, divide, square root)
  913.          in hardware. Transcendental functions are provided via a software
  914.          library provided by Weitek. For these library functions Weitek
  915.          claims a maximum relative error of 5 ULPs [31,33] (ULP = Unit in
  916.          the Last Place, numeric weight of the least significant mantissa
  917.          bit). This means that the last three bits in the mantissa of a
  918.          double precision result can be wrong. Note that the Intel 387 and
  919.          compatible math coprocessors generate the transcendental functions
  920.          with a small relative error with regard to the *extended double
  921.          precision* format. Thus, when rounded to double precision, their
  922.          function values are nearly always 'exact'. 387 type coprocessors
  923.          have superior accuracy when compared with Weitek's coprocesssors.
  924.  
  925.          The test diskette distributed with early versions of the
  926.          Cyrix 83D87 contained a program TRANCK that checks the
  927.          accuracy of the transcendental functions in the coprocessor
  928.          against a more precise software arithmetic [16]. I used this
  929.          program to compare the accuracy of the transcendental functions
  930.          on those 287/387/486 coprocessors/FPUs available to me. As TRANCK
  931.          will not accept negative numbers as intervall limits, I tested
  932.          each function on an intervall along the positive x-axis. The
  933.          functions tested are F2XM1 (2**x-1), FSIN (sine), FCOS (cosine),
  934.          FPTAN (tangent), FPATAN (arctangent), FYL2X (y * log2 (x)),
  935.          and FYL2XP1 (y * log2 (x+1)). These are all the transcendental
  936.          functions implemented on the 80387. Note that the square root
  937.          (FSQRT) is *not* a transcendental function. For every function,
  938.          100,000 arguments were evaluated. The arguments were uniformally
  939.          distributed within the intervall tested. The EM87 emulator could
  940.          not be checked with TRANCK, since the multiple precision package
  941.          in TRANCK would always return with an error message immediately.
  942.          However, the Franke387 emulator could be tested.
  943.  
  944.  
  945.