ASIN (Transact-SQL)

Se aplica a:SQL ServerAzure SQL DatabaseAzure SQL Managed InstanceAzure Synapse AnalyticsAnalytics Platform System (PDW)Punto de conexión de análisis SQL en Microsoft FabricAlmacenamiento en Microsoft Fabric

Una función que devuelve el ángulo, expresado en radianes, cuyo seno es la expresión float especificada. También se denomina arcoseno.

Convenciones de sintaxis de Transact-SQL

Sintaxis

ASIN ( float_expression )  

Nota:

Para ver la sintaxis de Transact-SQL para SQL Server 2014 (12.x) y versiones anteriores, consulta la Documentación de versiones anteriores.

Argumentos

float_expression
Es una expresión o bien de tipo float o bien de un tipo que se puede convierte en float de manera implícita. Solo se admite un valor comprendido entre -1,00 y 1,00. En el caso de los valores que se encuentran fuera de este rango, no se devolverá ningún y ASIN notificará un error de dominio.

Tipos de valores devueltos

float

Ejemplos

En este ejemplo se toma una expresión float y se devuelve el valor de ASIN del á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  

El conjunto de resultados es el siguiente:

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

Ejemplos: Azure Synapse Analytics y Sistema de la plataforma de análisis (PDW)

Este ejemplo devuelve el arcoseno de 1,00.

SELECT ASIN(1.00) AS asinCalc;  

En este ejemplo se devuelve un error, porque se solicita el arcoseno de un valor fuera del intervalo permitido.

SELECT ASIN(1.1472738) AS asinCalc;  

Vea también

CEILING (Transact-SQL)
Funciones matemáticas (Transact-SQL)
SET ARITHIGNORE (Transact-SQL)
SET ARITHABORT (Transact-SQL)