qck.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Deriving Trigonometric Functions
  Summary             Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 Deriving Trigonometric Functions
 
 ■ From the built-in Visual Basic functions COS, EXP, LOG, SIN, SGN, SQR, and
   TAN, you can derive the other transcendental functions.
   See: COS Function  EXP Function  LOG Function  SIN Function
        SGN Function  SQR Function  TAN Function
 
 ■ The trigonometric and mathematical functions not intrinsic to Visual Basic
   can be calculated as shown below, where X is an angle measured in radians
   and Y is a unitless number:
 
   Function                 Basic Equivalent
   ═══════════════════════  ════════════════════════════════════════════════
   Secant                   SEC(X) = 1/COS(X)
   Cosecant                 CSC(X) = 1/SIN(X)
   Cotangent                COT(X) = 1/TAN(X)
   Hyperbolic Sine          SINH(Y) = (EXP(Y) - EXP(-Y))/2
   Hyperbolic Cosine        COSH(Y) = (EXP(Y) + EXP(-Y))/2
   Hyperbolic Tangent       TANH(Y) = (EXP(Y) - EXP(-Y))/(EXP(Y) + EXP(-Y))
   Hyperbolic Secant        SECH(Y) = 2/(EXP(Y) + EXP(-Y))
   Hyperbolic Cosecant      CSCH(Y) = 2/(EXP(Y) - EXP(-Y))
   Hyperbolic Cotangent     COTH(Y) = EXP(-Y)/(EXP(Y) - EXP(-Y)) * 2 + 1
   Inverse Sine             ARCSIN(Y) = ATN(Y/SQR(1-Y*Y))
   Inverse Cosine           ARCCOS(Y) = -ATN(Y/SQR(1-Y*Y)) + pi/2
   Inverse Secant           ARCSEC(Y) = ATN(Y/SQR(1-Y*Y)) + (SGN(Y)-1) * pi/2
   Inverse Cosecant         ARCCSC(Y) = ATN(1/SQR(1-Y*Y)) + (SGN(Y)-1) * pi/2
   Inverse Cotangent        ARCCOT(Y) = -ATN(Y) + pi/2
   Inverse Hyperbolic Sine  ARCSINH(Y) = LOG(Y + SQR(Y*Y+1))
   Inverse Hyperbolic Cos   ARCCOSH(Y) = LOG(Y + SQR(Y*Y-1))
   Inverse Hyperbolic Tan   ARCCTANH(Y) = LOG((1 + Y)/(1 - Y)) / 2
   Inverse Hyperbolic CSC   ARCCSCH(Y) = LOG((SGN(Y)*SQR(Y*Y+1)+1)/Y)
   Inverse Hyperbolic Sec   ARCSECH(Y) = LOG((SQR(1-Y*Y)+1) / Y)
   Inverse Hyperbolic Cot   ARCCOTH(Y) = LOG((Y+1)/(Y-1)) / 2
 
 ■ Pi has the following approximate value:
 
         pi = 3.14159265359     or     pi = 4.0 * ATN(1.0)
 
 ■ To convert values from degrees to radians, multiply the angle (in
   degrees) by pi/180 (or .0174532925199433), where pi = 3.141593.
 
 ■ To convert radian values to degrees, multiply radians by 180/pi (or
   57.2957795130824), where pi = 3.141593.