ASIN (Transact-SQL)
Devuelve el ángulo, expresado en radianes, cuyo seno es la expresión float especificada. También se denomina arco seno.
Convenciones de sintaxis de Transact-SQL
Sintaxis
ASIN ( float_expression )
Argumentos
- float_expression
Es una expresión del tipo float o de un tipo que puede convertirse implícitamente a float, con un valor comprendido entre -1 y 1. Con valores fuera de este intervalo se devuelve NULL y se notifica un error del dominio.
Tipos de valor devueltos
float
Ejemplos
En el siguiente 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)
Vea también
Referencia
Funciones matemáticas (Transact-SQL)