Function: SIN
Function: SIN

Function: SIN

Sin ( NUMBER )

Returns the trigonometric sine of a value.

Parameters

Parameter Type Description
NUMBER VALUE(FLOAT) The input value.

Returns

VALUE(FLOAT) The sine of the input value.

What It Does

This function takes a numeric value and returns the trigonometric sine of it. The input value is assumed to be in radians. The input value is interpreted as a floating-point number.


	a = sin(0);            // a = 0.0
	a = sin(pi() / 2);     // a = 1.0
	a = sin(pi());         // a = 1.2E-16 (float rounding - close to 0)
	a = sin(3 * pi() / 2); // a = -2.4E-16 (float rounding - close to 0)
	a = sin(2 * pi());     // a = -1.0

Additional Technical Notes

The return value of this function relies on TAME's implementation of Sine, which may be slightly different between implementations.

Due to rounding issues, you may be better off epsilon-rounding the return value, as some results that should be 0 may be nonzero, but very small.

×

Modal Header