Share via


ASIN (Transact-SQL)

Retorna o ângulo, em radiano, cujo seno é a expressão float especificada. Isso também é chamado de arco seno.

Ícone de vínculo de tópicoConvenções de sintaxe Transact-SQL

Sintaxe

ASIN ( float_expression )

Argumentos

  • float_expression
    É uma expressão do tipo float ou de um tipo que pode ser convertido implicitamente em float, com um valor de -1 a 1. Valores fora deste intervalo retornam NULL e relatam um erro de domínio.

Tipos de retorno

float

Exemplos

O exemplo a seguir usa uma expressão float e retorna o ASIN do ângulo especificado.

/* The first value will be -1.01. This fails because the value is 
outside the range.*/
DECLARE @angle float
SET @angle = -1.01
SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))
GO

-- The next value is -1.00.
DECLARE @angle float
SET @angle = -1.00
SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))
GO

-- The next value is 0.1472738.
DECLARE @angle float
SET @angle = 0.1472738
SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))
GO

Aqui está o conjunto de resultados.

-------------------------
.Net SqlClient Data Provider: Msg 3622, Level 16, State 1, Line 3
A 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)