home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / intel / 1534 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  58.5 KB

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