InterSystems IRIS Data Platform 2019.2  /  InterSystems SQL Reference

InterSystems SQL Reference
Previous section           Next section
InterSystems: The power behind what matters   

A scalar numeric function that returns the arc-sine, in radians, of the sine of an angle.
{fn ASIN(numeric-expression)}
numeric-expression A numeric expression whose value is between -1 and 1. This is the sine of the angle.
ASIN returns either the NUMERIC or DOUBLE data type. If numeric-expression is data type DOUBLE, ASIN returns DOUBLE; otherwise, it returns NUMERIC.
ASIN returns the inverse (arc) of the sine of an angle as a floating point number. The value of numeric-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 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

Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-08-23 06:48:00