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

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

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

Scilab Help >> Elementary Functions > Trigonometry > atanh

atanh

hyperbolic tangent inverse

Syntax

t = atanh(x)

Arguments

x

a real or complex vector/matrix.

t

a real or complex vector/matrix.

Description

The components of vector t are the hyperbolic tangent inverse of the corresponding entries of vector x. Definition domain is [-1,1] for the real function (see Remark).

Remark

In Scilab (as in some others numerical software) when you try to evaluate an elementary mathematical function outside its definition domain in the real case, then the complex extension is used (with a complex result). The most famous example being the sqrt function (try sqrt(-1)!). This approach have some drawbacks when you evaluate the function at a singular point which may led to different results when the point is considered as real or complex. For the atanh this occurs for -1 and 1 because the at these points the imaginary part do not converge and so atanh(1) = +Inf + i NaN while atanh(1) = +Inf for the real case (as lim x->1 of atanh(x)). So when you evaluate this function on the vector [1 2] then like 2 is outside the definition domain, the complex extension is used for all the vector and you get atanh(1) = +Inf + i NaN while you get atanh(1) = +Inf with [1 0.5] for instance.

Examples

// example 1
x=[0,%i,-%i]
tanh(atanh(x))

// example 2
x = [-%inf -3 -2 -1 0 1 2 3 %inf]
ieee(2)
atanh(tanh(x))

// example 3 (see Remark)
ieee(2)
atanh([1 2])
atanh([1 0.5])

See also

  • tanh — hyperbolic tangent
  • ieee — set floating point exception mode
Report an issue
<< atand Trigonometry atanhm >>

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:
Tue Feb 14 15:02:43 CET 2017