Hướng dẫn dùng arc sine trong PHP

(PHP 4, PHP 5, PHP 7, PHP 8)

Show

asinArc sine

Description

asin(float $num): float

Returns the arc sine of num in radians. asin() is the inverse function of sin(), which means that a==sin(asin(a)) for every value of a that is within asin()'s range.

Parameters

num

The argument to process

Return Values

The arc sine of num in radians

See Also

  • sin() - Sine
  • asinh() - Inverse hyperbolic sine
  • acos() - Arc cosine
  • atan() - Arc tangent

rahmatjon at gmail dot com

1 year ago

Hello!
Please put this example below the asin() function's description.
Thank you!

Example:
    $arg = 0.5;
   
$val = asin($arg);
    echo
"asin(" . $arg . ") = " . $val . " radians.
"
;
    echo
"Pi value = " . pi() . "
"
;  
    echo
"asin(" . $arg . ") = " . $val/pi()*180 . " degrees
"
;$arg = 1;
   
$val = asin($arg);
    echo
"asin(" . $arg . ") = " . $val . " radians.
"
;
    echo
"Pi value = " . pi() . "
"
;  
    echo
"asin(" . $arg . ") = " . $val/pi()*180 . " degrees
"
;
?>