Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2025.0.0 - English


atanh

hyperbolic tangent inverse

Syntax

t = atanh(x)

Arguments

x, t

Arrays of real or complex numbers, of same sizes.

Description

The components of vector t are the hyperbolic tangent inverse of the corresponding entries of vector x. The result t is real for x in [-1,1], and complex otherwise.

Examples

With input real numbers:

x = [-%inf -2 -1 -0.5 0 0.5 1 2 3 %inf];
[x ; atanh(tanh(x))]
atanh(x')
--> [x ; atanh(tanh(x))]
 ans  =
  -Inf  -2.  -1.  -0.5   0.   0.5   1.   2.   3.   Inf
  -Inf  -2.  -1.  -0.5   0.   0.5   1.   2.   3.   Inf

--> atanh(x')
 ans  =
   0.        + 1.5707963i
  -0.5493061 + 1.5707963i
  -Inf       + 0.i       
  -0.5493061 + 0.i       
   0.        + 0.i       
   0.5493061 + 0.i       
   Inf       + 0.i       
   0.5493061 + 1.5707963i
   0.3465736 + 1.5707963i
   0.        + 1.5707963i

With input complex numbers:

x = [-1-%i, -%i, 0, %i, %i+1];
[x; tanh(atanh(x)) ; atanh(tanh(x))]
atanh(x.')
--> [x; tanh(atanh(x)) ; atanh(tanh(x))]
 ans  =

  -1. - i     0. - i     0. + 0.i   0. + i     1. + i  
  -1. - i     0. - i     0. + 0.i   0. + i     1. + i  
  -1. - i     0. - i     0. + 0.i   0. + i     1. + i  

--> atanh(x.')
 ans  =

  -0.4023595 - 1.017222i
   0.        - 0.7853982i
   0.        + 0.i      
   0.        + 0.7853982i
   0.4023595 + 1.017222i

See also

  • tanh — hyperbolic tangent

History

VersionDescription
6.0
  • atanh(-1) is now always -Inf, and atanh(1) always Inf.
  • For any real x>1, imag(atanh(x)) is now > 0.
Report an issue
<< atand Trigonometry cos >>

Copyright (c) 2022-2024 (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:
Thu Oct 24 11:13:08 CEST 2024