MCPcopy
hub / github.com/shopspring/decimal / Atan

Method Atan

decimal.go:2123–2131  ·  view source on GitHub ↗

Trig functions Atan returns the arctangent, in radians, of x.

()

Source from the content-addressed store, hash-verified

2121
2122// Atan returns the arctangent, in radians, of x.
2123func (d Decimal) Atan() Decimal {
2124 if d.Equal(NewFromFloat(0.0)) {
2125 return d
2126 }
2127 if d.GreaterThan(NewFromFloat(0.0)) {
2128 return d.satan()
2129 }
2130 return d.Neg().satan().Neg()
2131}
2132
2133func (d Decimal) xatan() Decimal {
2134 P0 := NewFromFloat(-8.750608600031904122785e-01)

Callers 1

TestAtanFunction · 0.80

Calls 5

EqualMethod · 0.95
GreaterThanMethod · 0.95
satanMethod · 0.95
NegMethod · 0.95
NewFromFloatFunction · 0.85

Tested by 1

TestAtanFunction · 0.64