TanH()

TanH()

Hyperbolic Tangent of the argument

Syntax

      TANH( nArea ) -> nHyperbolicTangent

Arguments

<nArea> the size of the area (see below)

Returns

<nHyperbolicTangent> the hyperbolic tangent of <nArea>

Description

The function TANH() calculates the hyperbolic tangent of the argument. In analytical mathematics it is defined as SINH(x)/COSH(x).

Examples

      ? tanh( 0.0 ) // --> 0.0
      ? tanh( 1.0 ) // --> 0.7615...

Tests

      tanh( 0.0 ) == 0.0
      tanh( -0.5 ) == -tanh( 0.5 )

Compliance

TANH() is new in Harbours CT3’s library.

Platforms

All

Files

Source is trig.c, library is libct.

Seealso

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

TAN()

TAN()

Tangent of the argument

Syntax

      TAN( nRadiant ) -> nTangent

Arguments

<nRadiant> an angle size given in radiants

Returns

<nTangent> the tangent of <nRadiant>

Description

The function TAN() calculates the tangent of an angle whose size is given in radiants (full angle equals 2*Pi – see DTOR() for angle size given in degress). A common geometric interpretation of the TAN() function is the counterkathede-ankathede-ratio of a right-angled triangle, or, tan(x) = sin(x)/cos(x).

Examples

      ? tan( 0.0 ) // --> 0.0
      ? tan( 1.0 ) // --> 1.5574...

Tests

      tan( 0.0 ) == 0.0
      tan( PI() / 4 ) == 1
      tan( PI() ) == 0.0

Compliance

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

Platforms

All

Files

Source is trig.c, library is libct.

Seealso

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

SINH()

SINH()

Hyperbolic Sine of the argument

Syntax

      SINH( nArea ) -> nHyperbolicSine

Arguments

<nArea> the size of the area (see below)

Returns

<nHyperbolicSine> the hyperbolic sine of <nArea>

Description

The function SINH() calculates the hyperbolic sine of the argument. In analytical mathematics it is defined as 1/2*(exp(nArea)-exp(-nArea)). A common geometric interpretation of the SINH() function is the maximum y value of the points in the area with the given size <nArea>, that is bound by the x axis, a straight line through the point of origin (this one is fixed by the area) and the hyperbola xˆ2-yˆ2=1.

Examples

      ? sinh( 0.0 ) // --> 0.0
      ? sinh( 1.0 ) // --> 1.1752...

Tests

      sinh( 0.0 ) == 0.0
      sinh( -0.5 ) == -sinh( 0.5 )

Compliance

SINH() is new in Harbours CT3’s library.

Platforms

All

Files

Source is trig.c, library is libct.

Seealso

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

SIN()

SIN()

Sine of the argument

Syntax

      SIN (nRadiant) -> nSine

Arguments

<nRadiant> an angle size given in radiants

Returns

<nSine> the sine of <nRadiant>

Description

The function SIN() calculates the sine of an angle whose size is given in radiants (full angle equals 2*Pi – see DTOR() for angle size given in degress). A common geometric interpretation of the SIN() function is the counterkathede-hypotenuse-ratio of a right-angled triangle.

Examples

      ? sin( 0.0 ) // --> 0.0
      ? sin( 1.0 ) // --> 0.8414...

Tests

      sin( 0.0 ) == 0.0
      sin( PI() / 4 ) == sqrt( 1 / 2 )
      sin( PI() / 2 ) == 1.0
      sin( PI() ) == 0.0

Compliance

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

Platforms

All

Files

Source is trig.c, library is libct.

Seealso

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

RTOD()

RTOD()

Convert radiant to degree

Syntax

      RTOD( nRadiant ) -> nDegree

Arguments

<nRadiant> the size of an angle in radiant

Returns

<nDegree> the size of that angle in degree

Description

The function RTOD() can be used to convert sizes of angles given in radiant (like those returned by the asin, acos or atan function) to degrees that are commonly used geometry and technics.

Examples

      ? rtod( PI() ) // --> 180
      ? tanh( PI() / 3 ) // --> 60

Tests

      rtod( 0.0 ) == 0.0
      rtod( PI() ) == 180.0

Compliance

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

Platforms

All

Files

Source is trig.c, library is libct.

Seealso

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

PI()

PI()

Returns Pi, the perimeter-to-diameter-ratio of a circle

Syntax

      PI() -> nPi

Returns

<nPi> the math constant Pi with maximum precision available

Description

The function PI() can be used if the constant Pi is needed with maximum precision. One of the most known interpretations of this number is the constant perimeter-to-diameter-ratio of circles.

Examples

      // the diameter of a circle-like swimming pool is 3.4 meters, how
      // long is the perimeter ?

      ? Str( PI() * 3.4, 5, 3 ) + " meters" // --> 10.681 meters

Compliance

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

Platforms

All

Files

Source is trig.c, library is libct.

Seealso

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

COT()

COT()

Cotangent of the argument

Syntax

      COT( nRadiant ) -> nCotangent

Arguments

<nRadiant> an angle size given in radiants

Returns

<nCotangent> the cotangent of <nRadiant>

Description

The function COT() calculates the cotangent of an angle whose size is given in radiants (full angle equals 2*Pi – see DTOR() for angle size given in degress). A common geometric interpretation of the COT() function is the ankathede-counterkathede-ratio of a right-angled triangle, or, cot(x) = cos(x)/sin(x)=1/tan(x).

Examples

      ? cot( 1.0 ) // --> 0.6420...

Tests

      cot( PI() / 4 ) == 1
      cot( PI() / 2 ) == 0

Compliance

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

Platforms

All

Files

Source is trig.c, library is libct.

Seealso

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