• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

PHP atan function – Arc tangent

by admin

Description

The atan() function calculates the arc tangent value of the number provided as its only parameter, essentially reversing the operation of tan(). The return value is in radians—you should use the rad2deg() to convert radians to degrees.

Syntax:

asin(float $num): float

Parameters

Parameter Description
num The argument to process.

Return Values

Returns the calculated arctangent for the given argument in radians.

Examples

Example 1:

$tan = 10.0; 
echo "The arctangent of $tan is ", atan($tan);

Example 2:

$atan1 = atan(0.4346);
$atan2 = atan(tan(80));

Filed Under: PHP

Some more articles you might also be interested in …

  1. PHP function abs – Absolute value
  2. PHP function chr() – Generate a single-byte string from a number
  3. “Access denied for user ‘username’@’hostname’ (using password: YES)” – Error while connecting MySQL with PHP
  4. PHP function str_replace() – Replace all occurrences of the search string with the replacement string
  5. PHP asin function – Arc sine
  6. PHP addslashes function – Quote string with slashes
  7. How to test a PHP script
  8. PHP cos function – Cosine
  9. PHP function chop() – Alias of rtrim()
  10. PHP bindec function – Convert a number between arbitrary bases

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright