Share via


ASIN (Transact-SQL)

Aplica-se a:SQL ServerBanco de Dados SQL do AzureInstância Gerenciada de SQL do AzureAzure Synapse AnalyticsPDW (Analytics Platform System)Ponto de extremidade de SQL no Microsoft FabricWarehouse no Microsoft Fabric

Uma função que retorna o ângulo, em radianos, cujo seno é a expressão float especificada. Isso também é chamado de arco seno.

Convenções de sintaxe de Transact-SQL

Sintaxe

ASIN ( float_expression )  

Observação

Para exibir a sintaxe do Transact-SQL para o SQL Server 2014 (12.x) e versões anteriores, confira a Documentação das versões anteriores.

Argumentos

float_expression
Uma expressão do tipo float ou de um tipo que pode ser convertido implicitamente em float. Somente um valor que varia de -1,00 a 1,00 é válido. Para valores fora desse intervalo, nenhum valor será retornado e o ASIN relatará um erro de domínio.

Tipos de retorno

float

Exemplos

Este exemplo usa uma expressão float e retorna 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  

Este é 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 e PDW (Analytics Platform System)

Este exemplo retorna o arco seno de 1,00.

SELECT ASIN(1.00) AS asinCalc;  

Este exemplo retorna um erro, pois solicita ao arco seno um valor fora do intervalo permitido.

SELECT ASIN(1.1472738) AS asinCalc;  

Confira também

CEILING (Transact-SQL)
Funções matemáticas (Transact-SQL)
SET ARITHIGNORE (Transact-SQL)
SET ARITHABORT (Transact-SQL)