Trig and Hyperbolic functions

The following list contains the functions that you can use to calculate trigonometric and hyperbolic values.

For information about using string and numeric fields in functions, and nesting functions, see Evaluation functions.

acos(X)

Description

This function computes the arc cosine of X, in the interval [0,pi] radians.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic examples

This example returns 1.5707963267948966.

CODE

The following example calculates 180 divided by pi and multiplies the result by the arc cosine of 0. This example returns 90.0000000003.

CODE

acosh(X)

Description

This function computes the arc hyperbolic cosine of X radians.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic example

This example returns 1.3169578969248166.

CODE

asin(X)

Description

This function computes the arc sine of X, in the interval [-pi/2,+pi/2] radians.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic example

This example returns 1.5707963267948966.

CODE

The following example calculates 180 divided by pi and multiplies that by the arc sine of 1.

CODE

asinh(X)

Description

This function computes the arc hyperbolic sine of X radians.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic example

This example returns 0.881373587019543.

CODE

atan(X)

Description

This function computes the arc tangent of X, in the interval [-pi/2,+pi/2] radians.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic example

This example returns 0.46.

CODE

atan2(Y, X)

Description

This function computes the arc tangent of Y, X in the interval [-pi,+pi] radians.

Y is a value that represents the proportion of the y-coordinate. X is the value that represents the proportion of the x-coordinate.

To compute the value, the function takes into account the sign of both arguments to determine the quadrant.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic example

This example returns 0.59.

CODE

atanh(X)

Description

This function computes the arc hyperbolic tangent of X radians.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic example

This example returns 0.549.

CODE

cos(X)

Description

This function computes the cosine of an angle of X radians.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic examples

This example returns 0.5403023058681398.

CODE

The following example calculates the cosine of pi and returns -1.00000000000.

CODE

cosh(X)

Description

This function computes the hyperbolic cosine of X radians.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic example

This example returns 1.5430806348152437.

CODE

hypot(X,Y)

Description

This function computes the hypotenuse of a right-angled triangle whose legs are X and Y.

The function returns the square root of the sum of the squares of X and Y, as described in the Pythagorean theorem.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic example

Creates a field called n and returns n=5, which is the hypotenuse of a triangle whose legs are 3 and 4.

CODE

sin(X)

Description

This function computes the sine of X.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic examples

This example returns 0.8414709848078965.

CODE

The following example calculates the sine of pi divided by 180 and then multiplied by 90.

CODE

sinh(X)

Description

This function computes the hyperbolic sine of X radians.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic example

This example returns 1.1752011936438014.

CODE

tan(X)

Description

This function computes the tangent of X radians.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic examples

This example returns 1.5574077246549023

CODE

This example returns -0.08871575677006045

CODE

tanh(X)

Description

This function computes the hyperbolic tangent of X radians.

Usage

You can use this function with the eval, fieldformat, and where commands, and as part of eval expressions.

Basic example

This example returns 0.7615941559557649

CODE