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 sine, in radians, of an angle.
{fn SIN(numeric-expression)}
numeric-expression A numeric expression. This is an angle expressed in radians.
SIN returns either the NUMERIC or DOUBLE data type. If numeric-expression is data type DOUBLE, SIN returns DOUBLE; otherwise, it returns NUMERIC.
SIN takes any numeric value and returns its sine as a floating point number. SIN returns NULL if passed a NULL value. SIN treats nonnumeric strings as the numeric value 0.
SIN returns a value with a precision of 19 and a scale of 18.
SIN 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 example shows the effect of SIN:
SELECT {fn SIN(0.52)} AS Sine
returns 0.496880.
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