Documentation
¶
Index ¶
- type Float
- func (f *Float) Abs(a *Float) *Float
- func (f *Float) Add(a, b *Float) *Float
- func (f *Float) Arg(x *Float) *Float
- func (f *Float) Atan2(x *Float) *Float
- func (f *Float) Conj(a *Float) *Float
- func (f *Float) Div(a, b *Float) *Float
- func (f *Float) Exp(x *Float) *Float
- func (f *Float) Log(x *Float) *Float
- func (f *Float) Mul(a, b *Float) *Float
- func (f *Float) Pow(x *Float, y *Float) *Float
- func (f *Float) Rat(r *Rational)
- func (f *Float) SetRat(r *Rational)
- func (f *Float) Sqrt(a *Float) *Float
- func (f *Float) String() string
- func (f *Float) Sub(a, b *Float) *Float
- type Rational
- func (r *Rational) Add(a, b *Rational) *Rational
- func (r *Rational) Conj(a *Rational) *Rational
- func (r *Rational) Div(a, b *Rational) *Rational
- func (r *Rational) Mul(a, b *Rational) *Rational
- func (r *Rational) Neg(a *Rational) *Rational
- func (r *Rational) String() string
- func (r *Rational) Sub(a, b *Rational) *Rational
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Float ¶
Float is an imaginary number
func (*Float) Arg ¶
Arg computes arg(x + yi) = tan-1(y/x) https://mathworld.wolfram.com/ComplexArgument.html
func (*Float) Atan2 ¶
Atan2 computes atan2 of x https://en.wikipedia.org/wiki/Atan2
func (*Float) Exp ¶
Exp computes e^x for a complex number https://www.wolframalpha.com/input/?i=e%5E%28x+%2B+yi%29
func (*Float) Log ¶
Log computes the natural log of x https://en.wikipedia.org/wiki/Complex_logarithm
func (*Float) Pow ¶
Pow computes x**y https://mathworld.wolfram.com/ComplexExponentiation.html
func (*Float) Sqrt ¶
Sqrt computes the square root of the complex number https://www.johndcook.com/blog/2020/06/09/complex-square-root/
type Rational ¶
Rational is an imaginary number
func NewRational ¶
NewRational creates a new imaginary number