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()

2 responses to “ACOS()

  1. Pingback: Harbour All Functions – A | Viva Clipper !

  2. Pingback: Harbour Math Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.