home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / progrmng / function.zoo / realfun.doc < prev    next >
Text File  |  1990-11-07  |  4KB  |  89 lines

  1. To use the library of real functions, make sure the library is in the same
  2. directory as QuickBASIC.  Then, invoke QuickBASIC with the following command
  3. line (or something similar):
  4.  
  5.      c:\qb45\qb/l realfun
  6.  
  7. where is this case, the program is in the c:\qb45 directory.  Once the library
  8. is loaded, you will need to explicitly declare each function that you wish to
  9. use.  For example, to use the 'amod' function, put this line at the top of
  10. your program:
  11.  
  12.      DECLARE FUNCTION amod! (x!, b!)
  13.  
  14. and a similar one for any other functions you want to use from this library.
  15. The list of functions, their precision, and description, follows.
  16.  
  17.  
  18.           Library of Real Functions
  19.  
  20.  
  21.  function              precision         comments
  22.  
  23.  amod! (x!, b!)     single         x modulo b.  x, b, amod all floating pt.
  24.  dmod# (x#, b#)     double           "       x#, b#, dmod# all floating pt.
  25.  
  26.  amin! (x!, y!)     single         minimum of x and y
  27.  dmin# (x#, y#)     double           "
  28.  
  29.  amax! (x!, y!)     single         maximum of x and y
  30.  dmax# (x#, y#)     double           "
  31.  
  32.  sind! (x!)         single         sine of x, x in degrees
  33.  cosd! (x!)           "            cosine,        "
  34.  tand! (x!)           "            tangent,       "
  35.  
  36.  dsind# (x#)        double         sine of x, x in degrees
  37.  dcosd# (x#)          "            cosine,        "
  38.  dtand# (x#)          "            tangent,       "
  39.  
  40.  asin! (x!)         single         inverse sine of x, returns radians
  41.  acos! (x!)           "            inverse cosine,     "
  42.  ATN(x)               "            inverse tangent, (intrinsic to Quick-
  43.                                         BASIC), returns radians
  44.  atan! (y!, x!)       "            inverse tangent of y/x, correcting for
  45.                                         quadrant, returns radians
  46.  
  47.  asind! (x!)        single         inverse sine of x, returns degrees
  48.  acosd! (x!)          "            inverse cosine,     "
  49.  atnd! (x!)           "            inverse tangent,    "
  50.  atand! (y!, x!)      "            inverse tangent of y/x, correcting for
  51.                                         quadrant, returns degrees
  52.  
  53.  dasin# (x#)        double         inverse sine of x, returns radians
  54.  dacos# (x#)          "            inverse cosine,     "
  55.  ATN(x#)              "            inverse tangent, (intrinsic to Quick-
  56.                                         BASIC), returns radians
  57.  datan# (y#, x#)      "            inverse tangent of y/x, correcting for
  58.                                         quadrant, returns radians
  59.  
  60.  dasind# (x#)       double         inverse sine of x, returns degrees
  61.  dacosd# (x#)         "            inverse cosine,     "
  62.  datnd# (x#)          "            inverse tangent,    "
  63.  datand# (y#, x#)     "            inverse tangent of y/x, correcting for
  64.                                         quadrant, returns degrees
  65.  
  66.  sinh! (x!)         single         hyperbolic sine of x
  67.  cosh! (x!)           "            hyperbolic cosine
  68.  tanh! (x!)           "            hyperbolic tangent 
  69.  
  70.  dsinh# (x#)        double         hyperbolic sine of x
  71.  dcosh# (x#)          "            hyperbolic cosine
  72.  dtanh# (x#)          "            hyperbolic tangent
  73.  
  74.  asinh! (x!)        single         inverse hyperbolic sine of x
  75.  acosh! (x!)          "            inverse hyperbolic cosine
  76.  atanh! (x!)          "            inverse hyperbolic tangent
  77.  
  78.  dasinh# (x#)       double         inverse hyperbolic sine of x
  79.  dacosh# (x#)         "            inverse hyperbolic cosine
  80.  datanh# (x#)         "            inverse hyperbolic tangent
  81.  
  82.  
  83. Note:  most of the trigonometric functions (regular and hyperbolic sine,
  84. cosine, and tangent) are not one-to-one, that is, more than one value of x
  85. will lead to the same functional value.  This makes it difficult to determine
  86. exactly which value of x to return with the inverse trig functions.  This has
  87. only been accounted for with the inverse tangent function (atan, atand, datan,
  88. datand); you are left to your own devices for the rest.
  89.