sin是假设X为弧度的三角函数正弦。
sin(X)
*PI = \3.1415926535; $a = 30; # in degrees $sin = sin($a/180*$PI); print "sin(" . $a . "°) = " . $sin . "\n";