home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bsd / src / libm / libm-amiga / readme < prev   
Text File  |  1993-09-23  |  14KB  |  280 lines

  1. /*
  2.  * Copyright (c) 1985 Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms, with or without
  6.  * modification, are permitted provided that the following conditions
  7.  * are met:
  8.  * 1. Redistributions of source code must retain the above copyright
  9.  *    notice, this list of conditions and the following disclaimer.
  10.  * 2. Redistributions in binary form must reproduce the above copyright
  11.  *    notice, this list of conditions and the following disclaimer in the
  12.  *    documentation and/or other materials provided with the distribution.
  13.  * 3. All advertising materials mentioning features or use of this software
  14.  *    must display the following acknowledgement:
  15.  *    This product includes software developed by the University of
  16.  *    California, Berkeley and its contributors.
  17.  * 4. Neither the name of the University nor the names of its contributors
  18.  *    may be used to endorse or promote products derived from this software
  19.  *    without specific prior written permission.
  20.  *
  21.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  22.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  25.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31.  * SUCH DAMAGE.
  32.  *
  33.  * K.C. Ng, with Z-S. Alex Liu, S. McDonald, P. Tang, W. Kahan.
  34.  * Revised on 5/10/85, 5/13/85, 6/14/85, 8/20/85, 8/27/85, 9/11/85.
  35.  *
  36.  *    @(#)README    5.4 (Berkeley) 10/9/90
  37.  */
  38.  
  39. ******************************************************************************
  40. *  This is a description of the upgraded elementary functions (listed in 1). *
  41. *  Bessel functions (j0, j1, jn, y0, y1, yn), floor, and fabs passed over    *
  42. *  from 4.2BSD without change except perhaps for the way floating point      *
  43. *  exception is signaled on a VAX.  Three lines that contain "errno" in erf.c*
  44. *  (error functions erf, erfc) have been deleted to prevent overriding the   *
  45. *  system "errno".                                                           *
  46. ******************************************************************************
  47.  
  48. 0. Total number of files: 40
  49.  
  50.         IEEE/Makefile   VAX/Makefile    VAX/support.s   erf.c       lgamma.c
  51.         IEEE/atan2.c    VAX/argred.s    VAX/tan.s       exp.c       log.c
  52.         IEEE/cabs.c     VAX/atan2.s     acosh.c         exp__E.c    log10.c
  53.         IEEE/cbrt.c     VAX/cabs.s      asincos.c       expm1.c     log1p.c
  54.         IEEE/support.c  VAX/cbrt.s      asinh.c         floor.c     log__L.c
  55.         IEEE/trig.c     VAX/infnan.s    atan.c          j0.c        pow.c
  56.         Makefile        VAX/sincos.s    atanh.c         j1.c        sinh.c
  57.         README          VAX/sqrt.s      cosh.c          jn.c        tanh.c
  58.  
  59. 1. Functions implemented :
  60.     (A). Standard elementary functions (total 22) :
  61.         acos(x)                 ...in file  asincos.c 
  62.         asin(x)                 ...in file  asincos.c
  63.         atan(x)                 ...in file  atan.c
  64.         atan2(x,y)              ...in files IEEE/atan2.c, VAX/atan2.s
  65.         sin(x)                  ...in files IEEE/trig.c,  VAX/sincos.s
  66.         cos(x)                  ...in files IEEE/trig.c,  VAX/sincos.s
  67.         tan(x)                  ...in files IEEE/trig.c,  VAX/tan.s
  68.         cabs(x,y)               ...in files IEEE/cabs.c,  VAX/cabs.s
  69.         hypot(x,y)              ...in files IEEE/cabs.c,  VAX/cabs.s
  70.         cbrt(x)                 ...in files IEEE/cbrt.c,  VAX/cbrt.s
  71.         exp(x)                  ...in file  exp.c
  72.         expm1(x):=exp(x)-1      ...in file  expm1.c
  73.         log(x)                  ...in file  log.c
  74.         log10(x)                ...in file  log10.c
  75.         log1p(x):=log(1+x)      ...in file  log1p.c
  76.         pow(x,y)                ...in file  pow.c
  77.         sinh(x)                 ...in file  sinh.c
  78.         cosh(x)                 ...in file  cosh.c
  79.         tanh(x)                 ...in file  tanh.c
  80.         asinh(x)                ...in file  asinh.c
  81.         acosh(x)                ...in file  acosh.c
  82.         atanh(x)                ...in file  atanh.c
  83.                         
  84.     (B). Kernel functions :
  85.         exp__E(x,c) ...in file exp__E.c, used by expm1/exp/pow/cosh
  86.         log__L(s)   ...in file log__L.c, used by log1p/log/pow
  87.         libm$argred ...in file VAX/argred.s, used by VAX version of sin/cos/tan
  88.  
  89.     (C). System supported functions :
  90.         sqrt()      ...in files IEEE/support.c, VAX/sqrt.s
  91.         drem()      ...in files IEEE/support.c, VAX/support.s
  92.         finite()    ...in files IEEE/support.c, VAX/support.s
  93.         logb()      ...in files IEEE/support.c, VAX/support.s
  94.         scalb()     ...in files IEEE/support.c, VAX/support.s
  95.         copysign()  ...in files IEEE/support.c, VAX/support.s
  96.         rint()      ...in file  floor.c
  97.  
  98.  
  99.    Notes: 
  100.        i. The codes in files ending with ".s" are written in VAX assembly 
  101.           language. They are intended for VAX computers.
  102.  
  103.           Files that end with ".c" are written in C. They are intended
  104.           for either a VAX or a machine that conforms to the IEEE 
  105.           standard 754 for double precision floating-point arithmetic.
  106.  
  107.       ii. On other than VAX or IEEE machines, run the original math 
  108.           library, formerly "/usr/lib/libm.a", now "/usr/lib/libom.a", if
  109.       nothing better is available.
  110.  
  111.      iii. The trigonometric functions sin/cos/tan/atan2 in files "VAX/sincos.s",
  112.           "VAX/tan.s" and "VAX/atan2.s" are different from those in
  113.           "IEEE/trig.c" and "IEEE/atan2.c".  The VAX assembler code uses the
  114.           true value of pi to perform argument reduction, while the C code uses
  115.           a machine value of PI (see "IEEE/trig.c").
  116.  
  117.  
  118. 2. A computer system that conforms to IEEE standard 754 should provide 
  119.                 sqrt(x),
  120.                 drem(x,p), (double precision remainder function)
  121.                 copysign(x,y),
  122.                 finite(x),
  123.                 scalb(x,N),
  124.                 logb(x) and
  125.                 rint(x).
  126.    These functions are either required or recommended by the standard.
  127.    For convenience, a (slow) C implementation of these functions is 
  128.    provided in the file "IEEE/support.c".
  129.  
  130.    Warning: The functions in IEEE/support.c are somewhat machine dependent.
  131.    Some modifications may be necessary to run them on a different machine.
  132.    Currently, if compiled with a suitable flag, "IEEE/support.c" will work
  133.    on a National 32000, a Zilog 8000, a VAX, and a SUN (cf. the "Makefile"
  134.    in this directory). Invoke the C compiler thus:
  135.  
  136.         cc -c -DVAX IEEE/support.c              ... on a VAX, D-format
  137.         cc -c -DNATIONAL IEEE/support.c         ... on a National 32000
  138.         cc -c  IEEE/support.c                   ... on other IEEE machines,
  139.                                                     we hope.
  140.  
  141.    Notes: 
  142.       1. Faster versions of "drem" and "sqrt" for IEEE double precision
  143.          (coded in C but intended for assembly language) are given at the
  144.          end of "IEEE/support.c" but commented out since they require certain
  145.          machine-dependent functions.
  146.  
  147.       2. A fast VAX assembler version of the system supported functions
  148.          copysign(), logb(), scalb(), finite(), and drem() appears in file 
  149.          "VAX/support.s".  A fast VAX assembler version of sqrt() is in
  150.          file "VAX/sqrt.s".
  151.  
  152. 3. Two formats are supported by all the standard elementary functions: 
  153.    the VAX D-format (56-bit precision), and the IEEE double format 
  154.    (53-bit precision).  The cbrt() in "IEEE/cbrt.c" is for IEEE machines 
  155.    only. The functions in files that end with ".s" are for VAX computers 
  156.    only. The functions in files that end with ".c" (e