ASIN (T-SQL)

Returns the angle in radians whose sine is the given float expression (also called arcsine).

Syntax

ASIN(float_expression)

Arguments
float_expression
Is an expression of the type float, with a value between -1 and 1. Values outside this range return NULL and report a domain error.
Return Types

float

Examples

This example takes a float expression and returns the ASIN of the given angle.

-- First value will be -1.01, which fails.

DECLARE @angle float

SET @angle = -1.01

SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))

GO

  

-- Next value is -1.00.

DECLARE @angle float

SET @angle = -1.00

SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))

GO

  

-- Next value is 0.1472738.

DECLARE @angle float

SET @angle = 0.1472738

SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))

GO

  

Here is the result set:

--------------------------------------------------------

The ASIN of the angle is:                               

  

(1 row(s) affected)

  

Domain error occurred.

  

                                                         

--------------------------------------------------------

The ASIN of the angle is: -1.5708                       

  

(1 row(s) affected)

  

                                                         

--------------------------------------------------------

The ASIN of the angle is: 0.147811                      

  

(1 row(s) affected)

  

See Also
CEILING SET ARITHIGNORE
SET ARITHABORT Mathematical Functions

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.