SIN

SIN(value)[source]

Computes the sine of a given number or numeric array.

This function calculates the trigonometric sine of a given number or array of numbers, where the input is interpreted in radians. If an array of numbers is provided, the sine is calculated for each element individually. If the input is blank or in an error state, the formula will evaluate to an error.

Parameters:

value (int | float | Operand) –

The numeric input, in radians, whose sine is to be computed.

Supported types:

  • INTEGER

  • DECIMAL

  • INTEGER_ARRAY

  • DECIMAL_ARRAY

Return type:

Formula

Returns:

A Formula object representing the computed sine.

Supported types:

  • DECIMAL

  • DECIMAL_ARRAY

Raises:

ValueError – If value is not a numeric type or a numeric array.

Examples

Basic usage with a scalar:

SIN(0)
# Returns 0.0

Usage with a model object:

SIN(my_numeric_field)
# Returns a formula representing the sine of `my_numeric_field` (in radians)

Usage with an array:

SIN([0, 1.5707963, 3.1415927])
# Returns [0.0, 1.0, 0.0] approximately