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.- Return type:
- Returns:
A Formula object representing the computed sine.
- 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
``value`` — accepted types
DECIMAL
DECIMAL_ARRAY
INTEGER
INTEGER_ARRAY
Return types
DECIMAL
DECIMAL_ARRAY