返回以弧度表示的角度值,該角度值的正弦為給定的 float 表達(dá)式;亦稱反正弦。
ASIN ( float_expression )
float_expression
是 float 類型的表達(dá)式,其取值范圍從 -1 到 1。對超過此范圍的參數(shù)值,函數(shù)將返回 NULL 并且報告域錯誤。
float
下例用 float 表達(dá)式返回給定角的 ASIN 值。
-- First value will be -1.01, which fails.
DECLARE @angle float
SET @angle = -1.01
SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))
GO
-- Next value is -1.00.
DECLARE @angle float
SET @angle = -1.00
SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))
GO
-- Next value is 0.1472738.
DECLARE @angle float
SET @angle = 0.1472738
SELECT 'The ASIN of the angle is: ' + CONVERT(varchar, ASIN(@angle))
GO
下面是結(jié)果集:
-------------------------
The ASIN of the angle is:
(1 row(s) affected)
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)
相關(guān)文章