Condividi tramite


ASIN (Transact-SQL)

Si applica a: SQL Server database SQL di Azure Istanza gestita di SQL di Azure endpoint di analisi SQL di Azure Synapse Analytics Platform System (PDW) in Microsoft Fabric Warehouse in Microsoft Fabric

Funzione che restituisce l'angolo, espresso in radianti, il cui seno corrisponde all'espressione float specificata. Il valore restituito viene definito anche arcoseno.

Convenzioni relative alla sintassi Transact-SQL

Sintassi

ASIN ( float_expression )  

Nota

Per visualizzare la sintassi Transact-SQL per SQL Server 2014 (12.x) e versioni precedenti, vedere Documentazione delle versioni precedenti.

Argomenti

float_expression
Espressione di tipo float oppure di un tipo che può essere convertito in modo implicito in float. È valido solo un valore compreso tra -1,00 e 1,00. Per i valori esterni a questo intervallo, non viene restituito alcun valore e ASIN segnala un errore di dominio.

Tipi restituiti

float

Esempi

L'esempio seguente accetta un'espressione float e restituisce il valore ASIN dell'angolo specificato.

/* 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  

Questo è il set di risultati.

-------------------------  
.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)  

Esempi: Azure Synapse Analytics e Piattaforma di strumenti analitici (PDW)

In questo esempio viene restituito l'arcoseno di 1,00.

SELECT ASIN(1.00) AS asinCalc;  

L'esempio restituisce un errore perché richiede l'arcoseno di un valore non compreso nell'intervallo consentito.

SELECT ASIN(1.1472738) AS asinCalc;  

Vedi anche

CEILING (Transact-SQL)
Funzioni matematiche (Transact-SQL)
SET ARITHIGNORE (Transact-SQL)
SET ARITHABORT (Transact-SQL)