ATAN()

ATAN()

Arcus tangent of the argument

Syntax

      ACOS( nTangent ) -> nRadiant

Arguments

<nTangent> the tangent of an angle

Returns

<nRadiant> the angle whose tangent is <nTangent>

Description

The function ATAN() is the inverse function of TAN(). It takes a tangent value and returns the smallest(!) angle whose tangent equals to the argument. The return value is given in radiants between -PI()/2 and PI()/2 (full angle equals 2*Pi – see DTOR() if you need to convert it into degress).

Examples

      ? atan( 0.0 ) // --> 0.0
      ? atan( 0.5 ) // --> 0.4636...

Tests

      atan( 0.0 ) == 0.0
      atan( 1.0 ) == PI() / 4
      atan( 0.0 ) == 0.0 // and not PI(), although tan( PI() ) == 0.0 !

Compliance

ATAN() is compatible with CT3’s ATAN().

Platforms

All

Files

Source is trig.c, library is libct.

Seealso

SIN(), COS(), TAN(), COT(), ASIN(), ACOS(), ATAN(), SINH(), COSH(), TANH(), RTOD(), DTOR(), PI()

ASIN()

ASIN()

Arcus sine of the argument

Syntax

      ASIN( nSine ) -> nRadiant

Arguments

<nSine> the sine of an angle

Returns

<nRadiant> the angle whose sine is <nSine>

Description

The function ASIN() is the inverse function of SIN(). It takes a sine value and returns the smallest(!) angle whose sine equals to the argument. The return value is given in radiants (full angle equals 2*Pi – see DTOR() if you need to convert it into degress). Note, that <nSine> must be between -1 and 1 and that <nRadiant> is always between -PI()/2 and PI()/2.

Examples

      ? asin( 0.0 ) // --> 0.0
      ? asin( 0.5 ) // --> 0.5235...

Tests

      asin( 0.0 ) == 0.0
      asin( sqrt( 1 / 2 ) ) == PI() / 4
      asin( 1.0 ) == PI() / 2
      asin( 0.0 ) == 0.0  // and not PI(), since the smallest angle is returned !

Compliance

ASIN() is compatible with CT3’s ASIN().

Platforms

All

Files

Source is trig.c, library is libct.

Seealso

SIN(), COS(), TAN(), COT(), ACOS(), ATAN(), ATN2(), SINH(), COSH(), TANH(), RTOD(), DTOR(), PI()

ACOS()

ACOS()

Arcus cosine of the argument

Syntax

      ACOS( nCosine ) -> nRadiant

Arguments

<nCosine> the cosine of an angle

Returns

<nRadiant> the angle whose cosine is <nCosine>

Description

The function ACOS() is the inverse function of COS(). It takes a cosine value and returns the smallest(!) angle whose cosine equals to the argument. The return value is given in radiants (full angle equals 2*Pi – see DTOR() if you need to convert it into degress). Note, that <nCosine> must be between -1 and 1 and that <nRadiant> is always between 0 and PI().

Examples

      ? acos( 0.0 ) // --> PI() / 2
      ? acos( 0.5 ) // --> 1.04719...

Tests

      acos( 0.0 ) == PI() / 2
      acos( sqrt( 1 / 2 ) ) == PI() / 4
      acos( 1.0 ) == 0.0
      acos( -1.0 ) == PI()
      acos( 0.0 ) == PI() / 2  // and not -PI()/2, although cos (-PI()/2) == 0.0 !

Compliance

ACOS() is compatible with CT3’s ACOS().

Platforms

All

Files

Source is trig.c, library is libct.

Seealso

SIN(), COS(), TAN(), COT(), ASIN(), ATAN(), ATN2(), SINH(), COSH(), TANH(), RTOD(), DTOR(), PI()

CT_PI

PI()
 Returns pi with the highest degree of accuracy
------------------------------------------------------------------------------
 Syntax

     PI() --> nPI

 Returns

     PI() returns the pi value with the highest degree of accuracy.

 Description

     This function simplifies calculations when the most accurate pi value is
     required.

 Example

     Show the accurate display for the pi value:

     ? STR(PI(), 18, 15)      // Result:  3.141592653589793

 

Tools — Mathematical Functions

Introduction Mathematical Functions
ACOS()    Computes the cosine arc
ASIN()    Computes the sine arc
ATAN()    Computes the tangent arc
ATN2()    Computes the angle size from the sine and cosine
CEILING() Rounds up to the next integer
COS()     Computes the cosine
COT()     Computes the cotangent
DTOR()    Converts from a degree to radian measure
FACT()    Computes the factorial
FLOOR()   Rounds down to the next integer
FV()      Computes future value of capital
GETPREC() Determines the level of precision that is set
LOG10()   Computes the common logarithm
PAYMENT() Computes the periodic payment amount
PERIODS() Computes number of payment periods necessary to repay a loan
PI()      Returns pi with the highest degree of accuracy
PV()      Computes the cash present value after interest charges
RATE()    Computes the interest rate for a loan
RTOD()    Converts from a radian to degree measure
SETPREC() Sets the precision level for trigonometric functions
SIGN()    Determines the mathematical sign of a number
SIN()     Computes the sine of a radian value
TAN()     Computes the tangent of a radian value