asin() function in PHP


The asin() function returns the arc sine of a number. It specifies a number in the range -1 to 1. Returns NaN, if num is not in the range -1 to 1.

Syntax

asin(num)

Parameters

  • num − The number for which you want to return the arc sine. Specifies a number in range -1 to 1.

Return

The asin() function returns the arc sine of a number. It specifies a number in the range -1 to 1. Returns NaN, if num is not in the range -1 to 1.

Example

 Live Demo

<?php
   echo(asin(0.50) . "<br>");
   echo(asin(-0.90) . "<br>");
?>

Output

0.5235987755983<br>-1.1197695149986<br>

Let us see another example −

Example

 Live Demo

<?php
   echo(asin(0) . "<br>");
   echo(asin(1) . "<br>");
   echo(asin(-1) . "<br>");
   echo(asin(2) . "<br>");
?>

Output

0<br>1.5707963267949<br>-1.5707963267949<br>NAN<br>

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 26-Jun-2020

83 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements