Skip to content
Related Articles

Related Articles

Compute the Hyperbolic arctangent of numeric data in R Programming – atanh() Function
  • Last Updated : 08 Jun, 2020

atanh() function in R Language is used to compute the hyperbolic arctangent of numeric data.

Syntax: atanh(x)

Parameters:
x: Numeric value, array or vector.

Example 1:




# R program to illustrate
# atanh function
   
# Calling atanh() function over
# different numbers
atanh(0)
atanh(1)
atanh(0.9)
atanh(-0.8)

Output:



[1] 0
[1] Inf
[1] 1.472219
[1] -1.098612

Example 2:




# R program to illustrate
# atanh function
  
# Initializing some vectors
x <- c(0, 1, 0.9)
y <- c(-0.1, 0.1)
   
# Calling atanh() function
atanh(x)
atanh(y)

Output:

[1] 0.000000      Inf 1.472219
[1] -0.1003353  0.1003353

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :