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 cotangent, in radians, of an angle.
{fn COT(numeric-expression)}
numeric-expression A numeric expression. This is an angle expressed in radians.
COT returns either the NUMERIC or DOUBLE data type. If numeric-expression is data type DOUBLE, COT returns DOUBLE; otherwise, it returns NUMERIC.
COT takes any nonzero number and returns its cotangent as a floating point number. COT returns NULL if passed a NULL value. A numeric value of 0 (zero) causes a runtime error, generating an SQLCODE -400 (fatal error occurred). COT treats nonnumeric strings as the numeric value 0.
COT returns a value with a precision of 36 and a scale of 18.
COT 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 COT:
SELECT {fn COT(0.52)} AS Cotangent 
returns 1.74653.
SELECT {fn COT(124.1332)} AS Cotangent 
returns -0.040312.
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-20 05:45:45