Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Fonctions Elémentaires > Trigonométrie > atan


2-quadrant and 4-quadrant inverse tangent


phi = atan(x)
phi = atan(y, x)



a real or complex scalar, vector or matrix.


a real or complex scalar, vector or matrix.

x, y

a real scalars, vectors or matrices of the same size.


a real scalar, vector or matrix.


The first form computes the 2-quadrant inverse tangent, which is the inverse of tan(phi). For real x, phi is in the interval (-π/2,π/2). For complex x, atan has two singular, branching points +%i, -%i and the chosen branch cuts are the two imaginary half-straight lines [i,i∞) and (-i∞,-i].

The second form computes the 4-quadrant arctangent (atan2 in Fortran), this is, it returns the argument (angle) of the complex number x+i*y. The range of atan(y, x) is (-π,π].

For real arguments, both forms yield identical values if x>0.

In case of vector or matrix arguments, the evaluation is done element-wise, so that phi is a vector or matrix of the same size with phi(i, j) = atan(x(i, j)) or phi(i,j) = atan(y(i, j), x(i, j)).


// examples with the second form

// branch cuts
atan(-%eps + 2*%i)
atan(+%eps + 2*%i)
atan(-%eps - 2*%i)
atan(+%eps - 2*%i)

// values at the branching points

See also

  • atand — 2-quadrants et 4-quadrants tangeante inverse des éléments de l'argument, résultats exprimés en degrés.
  • tan — tangente
  • tand — tangent, argument in degree.
  • unwrap — unwrap a Y(x) profile or a Z(x,y) surface. Unfold a Y(x) profile
  • ieee — fixe ou indique le mode d'exception IEEE pour les calculs
Report an issue
<< asinh Trigonométrie atand >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 25 08:50:20 CET 2020