Caché SQL Reference
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   

A scalar numeric function that returns the arc-sine, in radians, of the sine of an angle.
{fn ASIN(float-expression)}
float-expression An expression of type float, whose value is between -1 and 1. This is the sine of the angle.
ASIN returns the inverse (arc) of the sine of an angle as a floating point number. The value of float-expression must be a signed decimal number ranging from 1 to -1 (inclusive). A number outside of this range causes a runtime error, generating an SQLCODE -400 (fatal error occurred). ASIN returns NULL if passed a NULL value. ASIN treats nonnumeric strings, including the empty string (''), as the numeric value 0.
ASIN returns a value of data type FLOAT with a precision of 19 and a scale of 18.
ASIN can only be used as an ODBC scalar function (with the curly brace syntax).
You can use the DEGREES function to convert radians to degrees. You can use the RADIANS function to convert degrees to radians.
The following examples show the effect of ASIN on two sines.
SELECT {fn ASIN(0.52)} AS ArcSine 
returns 0.5468509506...
SELECT {fn ASIN(-1.00)} AS ArcSine 
returns -1.5707963267...
See Also