Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

BigMath#atan

atan(decimal, numeric) → BigDecimal

Computes the arctangent of decimal to the specified number of digits of precision, numeric.

If decimal is NaN, returns NaN.

Example
BigMath.atan(BigDecimal('-1'), 16).to_s
#=> "-0.785398163397448309615660845819878471907514682065e0"
See also .log #cos .exp #E also in 3.2 · 3.1 · 3.0