Partilhar via


ASIN (Transact-SQL)

Aplica-se a:SQL ServerBase de Dados SQL do AzureInstância Gerida do Azure SQLAzure Synapse AnalyticsSistema de Plataforma de Análise (PDW)Ponto de Extremidade de Análise SQL no Microsoft FabricArmazém no Microsoft FabricBase de Dados SQL no Microsoft Fabric

Uma função que retorna o ângulo, em radianos, cujo seno é a expressão flutuante especificada. Isto também é chamado de arcseno.

Transact-SQL convenções de sintaxe

Sintaxe

ASIN ( float_expression )  

Arguments

float_expression
Uma expressão de tipo float ou de um tipo que pode implicitamente converter em float. Apenas um valor entre -1,00 e 1,00 é válido. Para valores fora deste intervalo, nenhum valor é devolvido e o ASIN reportará um erro de domínio.

Tipos de devolução

float

Examples

Este exemplo toma uma expressão float e devolve o valor 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)  

Exemplos: Azure Synapse Analytics and Analytics Platform System (PDW)

Este exemplo devolve o arcseno de 1,00.

SELECT ASIN(1.00) AS asinCalc;  

Este exemplo devolve um erro, porque solicita ao arcseno um valor fora do intervalo permitido.

SELECT ASIN(1.1472738) AS asinCalc;  

Consulte também

TETO (Transact-SQL)
Funções Matemáticas (Transact-SQL)
SET ARITHIGNORE (Transact-SQL)
SET ARITHABORT (Transact-SQL)