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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • 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 chr() – Generate a single-byte string from a number
  2. PHP function acos – Arc cosine
  3. PHP connection_status function – Returns connection status bitfield
  4. htaccess Cheatsheet
  5. PHP Function strncasecmp() – Binary safe case-insensitive string comparison of the first n characters
  6. PHP function strlen() – Get string length
  7. PHP Function str_word_count() – Return information about words used in a string
  8. PHP function str_ireplace() – Case-insensitive version of str_replace()
  9. How to test a PHP script
  10. PHP Function strchr() – Alias of strstr()

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright