Documentation
¶
Overview ¶
Package rational implements arithmetic for many elliptic, parabolic, and hyperbolic Cayley-Dickson constructs over the rational numbers and their plexifications.
Index ¶
- type BiCockle
- func (z *BiCockle) Add(x, y *BiCockle) *BiCockle
- func (z *BiCockle) Commutator(x, y *BiCockle) *BiCockle
- func (z *BiCockle) Conj(y *BiCockle) *BiCockle
- func (z *BiCockle) CrossRatioL(v, w, x, y *BiCockle) *BiCockle
- func (z *BiCockle) CrossRatioR(v, w, x, y *BiCockle) *BiCockle
- func (z *BiCockle) Equals(y *BiCockle) bool
- func (z *BiCockle) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *BiCockle) Inv(y *BiCockle) *BiCockle
- func (z *BiCockle) IsZeroDivisor() bool
- func (z *BiCockle) Mul(x, y *BiCockle) *BiCockle
- func (z *BiCockle) MöbiusL(y, a, b, c, d *BiCockle) *BiCockle
- func (z *BiCockle) MöbiusR(y, a, b, c, d *BiCockle) *BiCockle
- func (z *BiCockle) Neg(y *BiCockle) *BiCockle
- func (z *BiCockle) Norm() *big.Rat
- func (z *BiCockle) QuoL(x, y *BiCockle) *BiCockle
- func (z *BiCockle) QuoR(x, y *BiCockle) *BiCockle
- func (z *BiCockle) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *BiCockle) Real() *big.Rat
- func (z *BiCockle) Scal(y *BiCockle, a *big.Rat) *BiCockle
- func (z *BiCockle) Set(y *BiCockle) *BiCockle
- func (z *BiCockle) String() string
- func (z *BiCockle) Sub(x, y *BiCockle) *BiCockle
- type BiComplex
- func (z *BiComplex) Add(x, y *BiComplex) *BiComplex
- func (z *BiComplex) Conj(y *BiComplex) *BiComplex
- func (z *BiComplex) CrossRatio(v, w, x, y *BiComplex) *BiComplex
- func (z *BiComplex) Equals(y *BiComplex) bool
- func (z *BiComplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *BiComplex) Inv(y *BiComplex) *BiComplex
- func (z *BiComplex) IsZeroDivisor() bool
- func (z *BiComplex) Mul(x, y *BiComplex) *BiComplex
- func (z *BiComplex) Möbius(y, a, b, c, d *BiComplex) *BiComplex
- func (z *BiComplex) Neg(y *BiComplex) *BiComplex
- func (z *BiComplex) Norm() *big.Rat
- func (z *BiComplex) Quad() *Complex
- func (z *BiComplex) Quo(x, y *BiComplex) *BiComplex
- func (z *BiComplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *BiComplex) Real() *big.Rat
- func (z *BiComplex) Scal(y *BiComplex, a *big.Rat) *BiComplex
- func (z *BiComplex) Set(y *BiComplex) *BiComplex
- func (z *BiComplex) Star(y *BiComplex) *BiComplex
- func (z *BiComplex) String() string
- func (z *BiComplex) Sub(x, y *BiComplex) *BiComplex
- type BiHamilton
- func (z *BiHamilton) Add(x, y *BiHamilton) *BiHamilton
- func (z *BiHamilton) Commutator(x, y *BiHamilton) *BiHamilton
- func (z *BiHamilton) Conj(y *BiHamilton) *BiHamilton
- func (z *BiHamilton) CrossRatioL(v, w, x, y *BiHamilton) *BiHamilton
- func (z *BiHamilton) CrossRatioR(v, w, x, y *BiHamilton) *BiHamilton
- func (z *BiHamilton) Equals(y *BiHamilton) bool
- func (z *BiHamilton) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *BiHamilton) Inv(y *BiHamilton) *BiHamilton
- func (z *BiHamilton) IsZeroDivisor() bool
- func (z *BiHamilton) Mul(x, y *BiHamilton) *BiHamilton
- func (z *BiHamilton) MöbiusL(y, a, b, c, d *BiHamilton) *BiHamilton
- func (z *BiHamilton) MöbiusR(y, a, b, c, d *BiHamilton) *BiHamilton
- func (z *BiHamilton) Neg(y *BiHamilton) *BiHamilton
- func (z *BiHamilton) Norm() *big.Rat
- func (z *BiHamilton) QuoL(x, y *BiHamilton) *BiHamilton
- func (z *BiHamilton) QuoR(x, y *BiHamilton) *BiHamilton
- func (z *BiHamilton) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *BiHamilton) Real() *big.Rat
- func (z *BiHamilton) Scal(y *BiHamilton, a *big.Rat) *BiHamilton
- func (z *BiHamilton) Set(y *BiHamilton) *BiHamilton
- func (z *BiHamilton) String() string
- func (z *BiHamilton) Sub(x, y *BiHamilton) *BiHamilton
- type BiPerplex
- func (z *BiPerplex) Add(x, y *BiPerplex) *BiPerplex
- func (z *BiPerplex) Conj(y *BiPerplex) *BiPerplex
- func (z *BiPerplex) CrossRatio(v, w, x, y *BiPerplex) *BiPerplex
- func (z *BiPerplex) Equals(y *BiPerplex) bool
- func (z *BiPerplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *BiPerplex) Inv(y *BiPerplex) *BiPerplex
- func (z *BiPerplex) IsZeroDivisor() bool
- func (z *BiPerplex) Mul(x, y *BiPerplex) *BiPerplex
- func (z *BiPerplex) Möbius(y, a, b, c, d *BiPerplex) *BiPerplex
- func (z *BiPerplex) Neg(y *BiPerplex) *BiPerplex
- func (z *BiPerplex) Norm() *big.Rat
- func (z *BiPerplex) Quad() *Perplex
- func (z *BiPerplex) Quo(x, y *BiPerplex) *BiPerplex
- func (z *BiPerplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *BiPerplex) Real() *big.Rat
- func (z *BiPerplex) Scal(y *BiPerplex, a *big.Rat) *BiPerplex
- func (z *BiPerplex) Set(y *BiPerplex) *BiPerplex
- func (z *BiPerplex) Star(y *BiPerplex) *BiPerplex
- func (z *BiPerplex) String() string
- func (z *BiPerplex) Sub(x, y *BiPerplex) *BiPerplex
- type Cayley
- func (z *Cayley) Add(x, y *Cayley) *Cayley
- func (z *Cayley) Associator(w, x, y *Cayley) *Cayley
- func (z *Cayley) Commutator(x, y *Cayley) *Cayley
- func (z *Cayley) Conj(y *Cayley) *Cayley
- func (z *Cayley) Equals(y *Cayley) bool
- func (z *Cayley) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *Cayley) Graves(a, b, c, d, e, f, g, h *big.Int) *Cayley
- func (z *Cayley) Inv(y *Cayley) *Cayley
- func (z *Cayley) Klein(a, b, c, d, e, f, g, h *big.Int) *Cayley
- func (z *Cayley) Mul(x, y *Cayley) *Cayley
- func (z *Cayley) Neg(y *Cayley) *Cayley
- func (z *Cayley) Quad() *big.Rat
- func (z *Cayley) QuoL(x, y *Cayley) *Cayley
- func (z *Cayley) QuoR(x, y *Cayley) *Cayley
- func (z *Cayley) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *Cayley) Real() *big.Rat
- func (z *Cayley) Scal(y *Cayley, a *big.Rat) *Cayley
- func (z *Cayley) Set(y *Cayley) *Cayley
- func (z *Cayley) String() string
- func (z *Cayley) Sub(x, y *Cayley) *Cayley
- type Cockle
- func (z *Cockle) Add(x, y *Cockle) *Cockle
- func (z *Cockle) Commutator(x, y *Cockle) *Cockle
- func (z *Cockle) Conj(y *Cockle) *Cockle
- func (z *Cockle) CrossRatioL(v, w, x, y *Cockle) *Cockle
- func (z *Cockle) CrossRatioR(v, w, x, y *Cockle) *Cockle
- func (z *Cockle) Dot(y *Cockle) *big.Rat
- func (z *Cockle) Equals(y *Cockle) bool
- func (z *Cockle) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *Cockle) Inv(y *Cockle) *Cockle
- func (z *Cockle) IsNilpotent(n int) bool
- func (z *Cockle) IsZeroDivisor() bool
- func (z *Cockle) Mul(x, y *Cockle) *Cockle
- func (z *Cockle) MöbiusL(y, a, b, c, d *Cockle) *Cockle
- func (z *Cockle) MöbiusR(y, a, b, c, d *Cockle) *Cockle
- func (z *Cockle) Neg(y *Cockle) *Cockle
- func (z *Cockle) Quad() *big.Rat
- func (z *Cockle) QuoL(x, y *Cockle) *Cockle
- func (z *Cockle) QuoR(x, y *Cockle) *Cockle
- func (z *Cockle) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *Cockle) Real() *big.Rat
- func (z *Cockle) Scal(y *Cockle, a *big.Rat) *Cockle
- func (z *Cockle) Set(y *Cockle) *Cockle
- func (z *Cockle) String() string
- func (z *Cockle) Sub(x, y *Cockle) *Cockle
- type Complex
- func (z *Complex) Add(x, y *Complex) *Complex
- func (z *Complex) Conj(y *Complex) *Complex
- func (z *Complex) CrossRatio(v, w, x, y *Complex) *Complex
- func (z *Complex) Dot(y *Complex) *big.Rat
- func (z *Complex) Equals(y *Complex) bool
- func (z *Complex) Gauss(a, b *big.Int) *Complex
- func (z *Complex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *Complex) Inv(y *Complex) *Complex
- func (z *Complex) Mul(x, y *Complex) *Complex
- func (z *Complex) Möbius(y, a, b, c, d *Complex) *Complex
- func (z *Complex) Neg(y *Complex) *Complex
- func (z *Complex) Plus(y *Complex, a *big.Rat) *Complex
- func (z *Complex) PolyEval(y *Complex, poly Laurent) *Complex
- func (z *Complex) Quad() *big.Rat
- func (z *Complex) Quo(x, y *Complex) *Complex
- func (z *Complex) Rats() (*big.Rat, *big.Rat)
- func (z *Complex) Real() *big.Rat
- func (z *Complex) Scal(y *Complex, a *big.Rat) *Complex
- func (z *Complex) Set(y *Complex) *Complex
- func (z *Complex) String() string
- func (z *Complex) Sub(x, y *Complex) *Complex
- type DualComplex
- func (z *DualComplex) Add(x, y *DualComplex) *DualComplex
- func (z *DualComplex) Conj(y *DualComplex) *DualComplex
- func (z *DualComplex) CrossRatio(v, w, x, y *DualComplex) *DualComplex
- func (z *DualComplex) Equals(y *DualComplex) bool
- func (z *DualComplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *DualComplex) Inv(y *DualComplex) *DualComplex
- func (z *DualComplex) IsZeroDivisor() bool
- func (z *DualComplex) Mul(x, y *DualComplex) *DualComplex
- func (z *DualComplex) Möbius(y, a, b, c, d *DualComplex) *DualComplex
- func (z *DualComplex) Neg(y *DualComplex) *DualComplex
- func (z *DualComplex) Norm() *big.Rat
- func (z *DualComplex) Quad() *Complex
- func (z *DualComplex) Quo(x, y *DualComplex) *DualComplex
- func (z *DualComplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *DualComplex) Real() *big.Rat
- func (z *DualComplex) Scal(y *DualComplex, a *big.Rat) *DualComplex
- func (z *DualComplex) Set(y *DualComplex) *DualComplex
- func (z *DualComplex) Star(y *DualComplex) *DualComplex
- func (z *DualComplex) String() string
- func (z *DualComplex) Sub(x, y *DualComplex) *DualComplex
- type DualPerplex
- func (z *DualPerplex) Add(x, y *DualPerplex) *DualPerplex
- func (z *DualPerplex) Conj(y *DualPerplex) *DualPerplex
- func (z *DualPerplex) CrossRatio(v, w, x, y *DualPerplex) *DualPerplex
- func (z *DualPerplex) Equals(y *DualPerplex) bool
- func (z *DualPerplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *DualPerplex) Inv(y *DualPerplex) *DualPerplex
- func (z *DualPerplex) IsZeroDivisor() bool
- func (z *DualPerplex) Mul(x, y *DualPerplex) *DualPerplex
- func (z *DualPerplex) Möbius(y, a, b, c, d *DualPerplex) *DualPerplex
- func (z *DualPerplex) Neg(y *DualPerplex) *DualPerplex
- func (z *DualPerplex) Norm() *big.Rat
- func (z *DualPerplex) Quad() *Perplex
- func (z *DualPerplex) Quo(x, y *DualPerplex) *DualPerplex
- func (z *DualPerplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *DualPerplex) Real() *big.Rat
- func (z *DualPerplex) Scal(y *DualPerplex, a *big.Rat) *DualPerplex
- func (z *DualPerplex) Set(y *DualPerplex) *DualPerplex
- func (z *DualPerplex) Star(y *DualPerplex) *DualPerplex
- func (z *DualPerplex) String() string
- func (z *DualPerplex) Sub(x, y *DualPerplex) *DualPerplex
- type Hamilton
- func (z *Hamilton) Add(x, y *Hamilton) *Hamilton
- func (z *Hamilton) Commutator(x, y *Hamilton) *Hamilton
- func (z *Hamilton) Conj(y *Hamilton) *Hamilton
- func (z *Hamilton) CrossRatioL(v, w, x, y *Hamilton) *Hamilton
- func (z *Hamilton) CrossRatioR(v, w, x, y *Hamilton) *Hamilton
- func (z *Hamilton) Dot(y *Hamilton) *big.Rat
- func (z *Hamilton) Equals(y *Hamilton) bool
- func (z *Hamilton) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *Hamilton) Hurwitz(a, b, c, d *big.Int) *Hamilton
- func (z *Hamilton) Inv(y *Hamilton) *Hamilton
- func (z *Hamilton) Lipschitz(a, b, c, d *big.Int) *Hamilton
- func (z *Hamilton) Mul(x, y *Hamilton) *Hamilton
- func (z *Hamilton) MöbiusL(y, a, b, c, d *Hamilton) *Hamilton
- func (z *Hamilton) MöbiusR(y, a, b, c, d *Hamilton) *Hamilton
- func (z *Hamilton) Neg(y *Hamilton) *Hamilton
- func (z *Hamilton) Quad() *big.Rat
- func (z *Hamilton) QuoL(x, y *Hamilton) *Hamilton
- func (z *Hamilton) QuoR(x, y *Hamilton) *Hamilton
- func (z *Hamilton) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *Hamilton) Real() *big.Rat
- func (z *Hamilton) Scal(y *Hamilton, a *big.Rat) *Hamilton
- func (z *Hamilton) Set(y *Hamilton) *Hamilton
- func (z *Hamilton) String() string
- func (z *Hamilton) Sub(x, y *Hamilton) *Hamilton
- type Hyper
- func (z *Hyper) Add(x, y *Hyper) *Hyper
- func (z *Hyper) Conj(y *Hyper) *Hyper
- func (z *Hyper) CrossRatio(v, w, x, y *Hyper) *Hyper
- func (z *Hyper) Equals(y *Hyper) bool
- func (z *Hyper) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *Hyper) Inv(y *Hyper) *Hyper
- func (z *Hyper) IsZeroDivisor() bool
- func (z *Hyper) Mul(x, y *Hyper) *Hyper
- func (z *Hyper) Möbius(y, a, b, c, d *Hyper) *Hyper
- func (z *Hyper) Neg(y *Hyper) *Hyper
- func (z *Hyper) Norm() *big.Rat
- func (z *Hyper) Quad() *Infra
- func (z *Hyper) Quo(x, y *Hyper) *Hyper
- func (z *Hyper) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *Hyper) Real() *big.Rat
- func (z *Hyper) Scal(y *Hyper, a *big.Rat) *Hyper
- func (z *Hyper) Set(y *Hyper) *Hyper
- func (z *Hyper) Star(y *Hyper) *Hyper
- func (z *Hyper) String() string
- func (z *Hyper) Sub(x, y *Hyper) *Hyper
- type Infra
- func (z *Infra) Add(x, y *Infra) *Infra
- func (z *Infra) Conj(y *Infra) *Infra
- func (z *Infra) CrossRatio(v, w, x, y *Infra) *Infra
- func (z *Infra) Dot(y *Infra) *big.Rat
- func (z *Infra) Equals(y *Infra) bool
- func (z *Infra) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *Infra) Inv(y *Infra) *Infra
- func (z *Infra) IsZeroDivisor() bool
- func (z *Infra) Mul(x, y *Infra) *Infra
- func (z *Infra) Möbius(y, a, b, c, d *Infra) *Infra
- func (z *Infra) Neg(y *Infra) *Infra
- func (z *Infra) Plus(y *Infra, a *big.Rat) *Infra
- func (z *Infra) PolyEval(y *Infra, poly Laurent) *Infra
- func (z *Infra) Quad() *big.Rat
- func (z *Infra) Quo(x, y *Infra) *Infra
- func (z *Infra) Rats() (*big.Rat, *big.Rat)
- func (z *Infra) Real() *big.Rat
- func (z *Infra) Scal(y *Infra, a *big.Rat) *Infra
- func (z *Infra) Set(y *Infra) *Infra
- func (z *Infra) String() string
- func (z *Infra) Sub(x, y *Infra) *Infra
- type InfraCockle
- func (z *InfraCockle) Add(x, y *InfraCockle) *InfraCockle
- func (z *InfraCockle) Associator(w, x, y *InfraCockle) *InfraCockle
- func (z *InfraCockle) Commutator(x, y *InfraCockle) *InfraCockle
- func (z *InfraCockle) Conj(y *InfraCockle) *InfraCockle
- func (z *InfraCockle) Equals(y *InfraCockle) bool
- func (z *InfraCockle) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *InfraCockle) Inv(y *InfraCockle) *InfraCockle
- func (z *InfraCockle) IsZeroDivisor() bool
- func (z *InfraCockle) Mul(x, y *InfraCockle) *InfraCockle
- func (z *InfraCockle) Neg(y *InfraCockle) *InfraCockle
- func (z *InfraCockle) Quad() *big.Rat
- func (z *InfraCockle) QuoL(x, y *InfraCockle) *InfraCockle
- func (z *InfraCockle) QuoR(x, y *InfraCockle) *InfraCockle
- func (z *InfraCockle) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *InfraCockle) Real() *big.Rat
- func (z *InfraCockle) Scal(y *InfraCockle, a *big.Rat) *InfraCockle
- func (z *InfraCockle) Set(y *InfraCockle) *InfraCockle
- func (z *InfraCockle) String() string
- func (z *InfraCockle) Sub(x, y *InfraCockle) *InfraCockle
- type InfraComplex
- func (z *InfraComplex) Add(x, y *InfraComplex) *InfraComplex
- func (z *InfraComplex) Commutator(x, y *InfraComplex) *InfraComplex
- func (z *InfraComplex) Conj(y *InfraComplex) *InfraComplex
- func (z *InfraComplex) CrossRatioL(v, w, x, y *InfraComplex) *InfraComplex
- func (z *InfraComplex) CrossRatioR(v, w, x, y *InfraComplex) *InfraComplex
- func (z *InfraComplex) Dot(y *InfraComplex) *big.Rat
- func (z *InfraComplex) Equals(y *InfraComplex) bool
- func (z *InfraComplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *InfraComplex) Inv(y *InfraComplex) *InfraComplex
- func (z *InfraComplex) IsZeroDivisor() bool
- func (z *InfraComplex) Mul(x, y *InfraComplex) *InfraComplex
- func (z *InfraComplex) MöbiusL(y, a, b, c, d *InfraComplex) *InfraComplex
- func (z *InfraComplex) MöbiusR(y, a, b, c, d *InfraComplex) *InfraComplex
- func (z *InfraComplex) Neg(y *InfraComplex) *InfraComplex
- func (z *InfraComplex) Quad() *big.Rat
- func (z *InfraComplex) QuoL(x, y *InfraComplex) *InfraComplex
- func (z *InfraComplex) QuoR(x, y *InfraComplex) *InfraComplex
- func (z *InfraComplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *InfraComplex) Real() *big.Rat
- func (z *InfraComplex) Scal(y *InfraComplex, a *big.Rat) *InfraComplex
- func (z *InfraComplex) Set(y *InfraComplex) *InfraComplex
- func (z *InfraComplex) String() string
- func (z *InfraComplex) Sub(x, y *InfraComplex) *InfraComplex
- type InfraHamilton
- func (z *InfraHamilton) Add(x, y *InfraHamilton) *InfraHamilton
- func (z *InfraHamilton) Associator(w, x, y *InfraHamilton) *InfraHamilton
- func (z *InfraHamilton) Commutator(x, y *InfraHamilton) *InfraHamilton
- func (z *InfraHamilton) Conj(y *InfraHamilton) *InfraHamilton
- func (z *InfraHamilton) Equals(y *InfraHamilton) bool
- func (z *InfraHamilton) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *InfraHamilton) Inv(y *InfraHamilton) *InfraHamilton
- func (z *InfraHamilton) IsZeroDivisor() bool
- func (z *InfraHamilton) Mul(x, y *InfraHamilton) *InfraHamilton
- func (z *InfraHamilton) Neg(y *InfraHamilton) *InfraHamilton
- func (z *InfraHamilton) Quad() *big.Rat
- func (z *InfraHamilton) QuoL(x, y *InfraHamilton) *InfraHamilton
- func (z *InfraHamilton) QuoR(x, y *InfraHamilton) *InfraHamilton
- func (z *InfraHamilton) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *InfraHamilton) Real() *big.Rat
- func (z *InfraHamilton) Scal(y *InfraHamilton, a *big.Rat) *InfraHamilton
- func (z *InfraHamilton) Set(y *InfraHamilton) *InfraHamilton
- func (z *InfraHamilton) String() string
- func (z *InfraHamilton) Sub(x, y *InfraHamilton) *InfraHamilton
- type InfraPerplex
- func (z *InfraPerplex) Add(x, y *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) Commutator(x, y *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) Conj(y *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) CrossRatioL(v, w, x, y *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) CrossRatioR(v, w, x, y *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) Dot(y *InfraPerplex) *big.Rat
- func (z *InfraPerplex) Equals(y *InfraPerplex) bool
- func (z *InfraPerplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *InfraPerplex) Inv(y *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) IsZeroDivisor() bool
- func (z *InfraPerplex) Mul(x, y *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) MöbiusL(y, a, b, c, d *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) MöbiusR(y, a, b, c, d *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) Neg(y *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) Quad() *big.Rat
- func (z *InfraPerplex) QuoL(x, y *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) QuoR(x, y *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *InfraPerplex) Real() *big.Rat
- func (z *InfraPerplex) Scal(y *InfraPerplex, a *big.Rat) *InfraPerplex
- func (z *InfraPerplex) Set(y *InfraPerplex) *InfraPerplex
- func (z *InfraPerplex) String() string
- func (z *InfraPerplex) Sub(x, y *InfraPerplex) *InfraPerplex
- type Laurent
- type Perplex
- func (z *Perplex) Add(x, y *Perplex) *Perplex
- func (z *Perplex) Conj(y *Perplex) *Perplex
- func (z *Perplex) CrossRatio(v, w, x, y *Perplex) *Perplex
- func (z *Perplex) Dot(y *Perplex) *big.Rat
- func (z *Perplex) Equals(y *Perplex) bool
- func (z *Perplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *Perplex) Idempotent(sign int) *Perplex
- func (z *Perplex) Inv(y *Perplex) *Perplex
- func (z *Perplex) IsZeroDivisor() bool
- func (z *Perplex) Mul(x, y *Perplex) *Perplex
- func (z *Perplex) Möbius(y, a, b, c, d *Perplex) *Perplex
- func (z *Perplex) Neg(y *Perplex) *Perplex
- func (z *Perplex) Plus(y *Perplex, a *big.Rat) *Perplex
- func (z *Perplex) PolyEval(y *Perplex, poly Laurent) *Perplex
- func (z *Perplex) Quad() *big.Rat
- func (z *Perplex) Quo(x, y *Perplex) *Perplex
- func (z *Perplex) Rats() (*big.Rat, *big.Rat)
- func (z *Perplex) Real() *big.Rat
- func (z *Perplex) Scal(y *Perplex, a *big.Rat) *Perplex
- func (z *Perplex) Set(y *Perplex) *Perplex
- func (z *Perplex) String() string
- func (z *Perplex) Sub(x, y *Perplex) *Perplex
- type Supra
- func (z *Supra) Add(x, y *Supra) *Supra
- func (z *Supra) Commutator(x, y *Supra) *Supra
- func (z *Supra) Conj(y *Supra) *Supra
- func (z *Supra) CrossRatioL(v, w, x, y *Supra) *Supra
- func (z *Supra) CrossRatioR(v, w, x, y *Supra) *Supra
- func (z *Supra) Dot(y *Supra) *big.Rat
- func (z *Supra) Equals(y *Supra) bool
- func (z *Supra) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *Supra) Inv(y *Supra) *Supra
- func (z *Supra) IsZeroDivisor() bool
- func (z *Supra) Mul(x, y *Supra) *Supra
- func (z *Supra) MöbiusL(y, a, b, c, d *Supra) *Supra
- func (z *Supra) MöbiusR(y, a, b, c, d *Supra) *Supra
- func (z *Supra) Neg(y *Supra) *Supra
- func (z *Supra) Quad() *big.Rat
- func (z *Supra) QuoL(x, y *Supra) *Supra
- func (z *Supra) QuoR(x, y *Supra) *Supra
- func (z *Supra) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *Supra) Real() *big.Rat
- func (z *Supra) Scal(y *Supra, a *big.Rat) *Supra
- func (z *Supra) Set(y *Supra) *Supra
- func (z *Supra) String() string
- func (z *Supra) Sub(x, y *Supra) *Supra
- type SupraComplex
- func (z *SupraComplex) Add(x, y *SupraComplex) *SupraComplex
- func (z *SupraComplex) Associator(w, x, y *SupraComplex) *SupraComplex
- func (z *SupraComplex) Commutator(x, y *SupraComplex) *SupraComplex
- func (z *SupraComplex) Conj(y *SupraComplex) *SupraComplex
- func (z *SupraComplex) Equals(y *SupraComplex) bool
- func (z *SupraComplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *SupraComplex) Inv(y *SupraComplex) *SupraComplex
- func (z *SupraComplex) IsZeroDivisor() bool
- func (z *SupraComplex) Mul(x, y *SupraComplex) *SupraComplex
- func (z *SupraComplex) Neg(y *SupraComplex) *SupraComplex
- func (z *SupraComplex) Quad() *big.Rat
- func (z *SupraComplex) QuoL(x, y *SupraComplex) *SupraComplex
- func (z *SupraComplex) QuoR(x, y *SupraComplex) *SupraComplex
- func (z *SupraComplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *SupraComplex) Real() *big.Rat
- func (z *SupraComplex) Scal(y *SupraComplex, a *big.Rat) *SupraComplex
- func (z *SupraComplex) Set(y *SupraComplex) *SupraComplex
- func (z *SupraComplex) String() string
- func (z *SupraComplex) Sub(x, y *SupraComplex) *SupraComplex
- type SupraPerplex
- func (z *SupraPerplex) Add(x, y *SupraPerplex) *SupraPerplex
- func (z *SupraPerplex) Associator(w, x, y *SupraPerplex) *SupraPerplex
- func (z *SupraPerplex) Commutator(x, y *SupraPerplex) *SupraPerplex
- func (z *SupraPerplex) Conj(y *SupraPerplex) *SupraPerplex
- func (z *SupraPerplex) Equals(y *SupraPerplex) bool
- func (z *SupraPerplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *SupraPerplex) Inv(y *SupraPerplex) *SupraPerplex
- func (z *SupraPerplex) IsZeroDivisor() bool
- func (z *SupraPerplex) Mul(x, y *SupraPerplex) *SupraPerplex
- func (z *SupraPerplex) Neg(y *SupraPerplex) *SupraPerplex
- func (z *SupraPerplex) Quad() *big.Rat
- func (z *SupraPerplex) QuoL(x, y *SupraPerplex) *SupraPerplex
- func (z *SupraPerplex) QuoR(x, y *SupraPerplex) *SupraPerplex
- func (z *SupraPerplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *SupraPerplex) Real() *big.Rat
- func (z *SupraPerplex) Scal(y *SupraPerplex, a *big.Rat) *SupraPerplex
- func (z *SupraPerplex) Set(y *SupraPerplex) *SupraPerplex
- func (z *SupraPerplex) String() string
- func (z *SupraPerplex) Sub(x, y *SupraPerplex) *SupraPerplex
- type TriComplex
- func (z *TriComplex) Add(x, y *TriComplex) *TriComplex
- func (z *TriComplex) Conj(y *TriComplex) *TriComplex
- func (z *TriComplex) CrossRatio(v, w, x, y *TriComplex) *TriComplex
- func (z *TriComplex) Equals(y *TriComplex) bool
- func (z *TriComplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *TriComplex) Inv(y *TriComplex) *TriComplex
- func (z *TriComplex) IsZeroDivisor() bool
- func (z *TriComplex) Mul(x, y *TriComplex) *TriComplex
- func (z *TriComplex) Möbius(y, a, b, c, d *TriComplex) *TriComplex
- func (z *TriComplex) Neg(y *TriComplex) *TriComplex
- func (z *TriComplex) Norm() *big.Rat
- func (z *TriComplex) Quad() *BiComplex
- func (z *TriComplex) Quo(x, y *TriComplex) *TriComplex
- func (z *TriComplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *TriComplex) Real() *big.Rat
- func (z *TriComplex) Scal(y *TriComplex, a *big.Rat) *TriComplex
- func (z *TriComplex) Set(y *TriComplex) *TriComplex
- func (z *TriComplex) String() string
- func (z *TriComplex) Sub(x, y *TriComplex) *TriComplex
- type TriNilplex
- func (z *TriNilplex) Add(x, y *TriNilplex) *TriNilplex
- func (z *TriNilplex) Conj(y *TriNilplex) *TriNilplex
- func (z *TriNilplex) CrossRatio(v, w, x, y *TriNilplex) *TriNilplex
- func (z *TriNilplex) Equals(y *TriNilplex) bool
- func (z *TriNilplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *TriNilplex) Inv(y *TriNilplex) *TriNilplex
- func (z *TriNilplex) IsZeroDivisor() bool
- func (z *TriNilplex) Mul(x, y *TriNilplex) *TriNilplex
- func (z *TriNilplex) Möbius(y, a, b, c, d *TriNilplex) *TriNilplex
- func (z *TriNilplex) Neg(y *TriNilplex) *TriNilplex
- func (z *TriNilplex) Norm() *big.Rat
- func (z *TriNilplex) Quad() *Hyper
- func (z *TriNilplex) Quo(x, y *TriNilplex) *TriNilplex
- func (z *TriNilplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *TriNilplex) Real() *big.Rat
- func (z *TriNilplex) Scal(y *TriNilplex, a *big.Rat) *TriNilplex
- func (z *TriNilplex) Set(y *TriNilplex) *TriNilplex
- func (z *TriNilplex) String() string
- func (z *TriNilplex) Sub(x, y *TriNilplex) *TriNilplex
- type TriPerplex
- func (z *TriPerplex) Add(x, y *TriPerplex) *TriPerplex
- func (z *TriPerplex) Conj(y *TriPerplex) *TriPerplex
- func (z *TriPerplex) CrossRatio(v, w, x, y *TriPerplex) *TriPerplex
- func (z *TriPerplex) Equals(y *TriPerplex) bool
- func (z *TriPerplex) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *TriPerplex) Inv(y *TriPerplex) *TriPerplex
- func (z *TriPerplex) IsZeroDivisor() bool
- func (z *TriPerplex) Mul(x, y *TriPerplex) *TriPerplex
- func (z *TriPerplex) Möbius(y, a, b, c, d *TriPerplex) *TriPerplex
- func (z *TriPerplex) Neg(y *TriPerplex) *TriPerplex
- func (z *TriPerplex) Norm() *big.Rat
- func (z *TriPerplex) Quad() *BiPerplex
- func (z *TriPerplex) Quo(x, y *TriPerplex) *TriPerplex
- func (z *TriPerplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *TriPerplex) Real() *big.Rat
- func (z *TriPerplex) Scal(y *TriPerplex, a *big.Rat) *TriPerplex
- func (z *TriPerplex) Set(y *TriPerplex) *TriPerplex
- func (z *TriPerplex) String() string
- func (z *TriPerplex) Sub(x, y *TriPerplex) *TriPerplex
- type Ultra
- func (z *Ultra) Add(x, y *Ultra) *Ultra
- func (z *Ultra) Associator(w, x, y *Ultra) *Ultra
- func (z *Ultra) Commutator(x, y *Ultra) *Ultra
- func (z *Ultra) Conj(y *Ultra) *Ultra
- func (z *Ultra) Equals(y *Ultra) bool
- func (z *Ultra) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *Ultra) Inv(y *Ultra) *Ultra
- func (z *Ultra) IsZeroDivisor() bool
- func (z *Ultra) Mul(x, y *Ultra) *Ultra
- func (z *Ultra) Neg(y *Ultra) *Ultra
- func (z *Ultra) Quad() *big.Rat
- func (z *Ultra) QuoL(x, y *Ultra) *Ultra
- func (z *Ultra) QuoR(x, y *Ultra) *Ultra
- func (z *Ultra) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *Ultra) Real() *big.Rat
- func (z *Ultra) Scal(y *Ultra, a *big.Rat) *Ultra
- func (z *Ultra) Set(y *Ultra) *Ultra
- func (z *Ultra) String() string
- func (z *Ultra) Sub(x, y *Ultra) *Ultra
- type Zorn
- func (z *Zorn) Add(x, y *Zorn) *Zorn
- func (z *Zorn) Associator(w, x, y *Zorn) *Zorn
- func (z *Zorn) Commutator(x, y *Zorn) *Zorn
- func (z *Zorn) Conj(y *Zorn) *Zorn
- func (z *Zorn) Equals(y *Zorn) bool
- func (z *Zorn) Generate(rand *rand.Rand, size int) reflect.Value
- func (z *Zorn) Inv(y *Zorn) *Zorn
- func (z *Zorn) IsZeroDivisor() bool
- func (z *Zorn) Mul(x, y *Zorn) *Zorn
- func (z *Zorn) Neg(y *Zorn) *Zorn
- func (z *Zorn) Quad() *big.Rat
- func (z *Zorn) QuoL(x, y *Zorn) *Zorn
- func (z *Zorn) QuoR(x, y *Zorn) *Zorn
- func (z *Zorn) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
- func (z *Zorn) Real() *big.Rat
- func (z *Zorn) Scal(y *Zorn, a *big.Rat) *Zorn
- func (z *Zorn) Set(y *Zorn) *Zorn
- func (z *Zorn) String() string
- func (z *Zorn) Sub(x, y *Zorn) *Zorn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BiCockle ¶
type BiCockle struct {
// contains filtered or unexported fields
}
A BiCockle represents a rational Cockle biquaternion.
func NewBiCockle ¶
NewBiCockle returns a *BiCockle with value a+bi+ct+du+eH+fiH+gtH+huH.
func (*BiCockle) Commutator ¶
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*BiCockle) CrossRatioL ¶
CrossRatioL sets z equal to the left cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*BiCockle) CrossRatioR ¶
CrossRatioR sets z equal to the right cross-ratio of v, w, x, and y:
(v - x) * Inv(w - x) * (w - y) * Inv(v - y)
Then it returns z.
func (*BiCockle) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*BiCockle) IsZeroDivisor ¶
IsZeroDivisor returns true if z is a zero divisor.
func (*BiCockle) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = Mul(H, H) = -1 Mul(t, t) = Mul(u, u) = +1 Mul(i, t) = -Mul(t, i) = +u Mul(i, u) = -Mul(u, i) = -t Mul(i, H) = Mul(H, i) Mul(t, u) = -Mul(u, t) = -i Mul(t, H) = Mul(H, t) Mul(u, H) = Mul(H, u)
This binary operation is noncommutative but associative.
func (*BiCockle) MöbiusL ¶
MöbiusL sets z equal to the left Möbius (fractional linear) transform of y:
Inv(y*c + d) * (y*a + b)
Then it returns z.
func (*BiCockle) MöbiusR ¶
MöbiusR sets z equal to the right Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*BiCockle) Norm ¶
Norm returns the norm of z. If z = a+bi+ct+du+eH+fiH+gtH+huH, then the norm is
(a² + b² - c² - d² - e² - f² + g² + h²)² + 4(ae + bf - cg - dh)²
The norm is always non-negative.
func (*BiCockle) QuoL ¶
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is zero, then QuoL panics.
func (*BiCockle) QuoR ¶
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is zero, then QuoR panics.
func (*BiCockle) Rats ¶
func (z *BiCockle) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight rational components of z.
type BiComplex ¶
type BiComplex struct {
// contains filtered or unexported fields
}
A BiComplex represents a rational bicomplex number.
func NewBiComplex ¶
NewBiComplex returns a *BiComplex with value a+bi+cJ+diJ.
func (*BiComplex) Conj ¶
Conj sets z equal to the conjugate of y, and returns z. This operation changes the sign of all the components with J.
func (*BiComplex) CrossRatio ¶
CrossRatio sets z equal to the cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*BiComplex) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*BiComplex) IsZeroDivisor ¶
IsZeroDivisor returns true if z is a zero divisor.
func (*BiComplex) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = Mul(J, J) = -1 Mul(i, J) = Mul(J, i)
This binary operation is commutative and associative.
func (*BiComplex) Möbius ¶
Möbius sets z equal to the Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*BiComplex) Norm ¶
Norm returns the norm of z. If z = a+bi+cJ+diJ, then the norm is
(a² - b² + c² - d²)² + 4(ab + cd)²
There is another way to write the norm as a sum of two squares:
(a² + b² - c² - d²)² + 4(ac + bd)²
Alternatively, it can also be written as a difference of two squares:
(a² + b² + c² + d²)² - 4(ad - bc)²
Finally, you have the factorized form:
((a - d)² + (b + c)²)((a + d)² + (b - c)²)
In this form it is clear that the norm is always non-negative.
func (*BiComplex) Quad ¶
Quad returns the quadrance of z. If z = a+bi+cJ+diJ, then the quadrance is
a² - b² + c² - d² + 2(ab + cd)i
Note that this is a complex number.
func (*BiComplex) Quo ¶
Quo sets z equal to the quotient of x and y. If y is a zero divisor, then Quo panics.
type BiHamilton ¶
type BiHamilton struct {
// contains filtered or unexported fields
}
A BiHamilton represents a rational Hamilton biquaternion.
func NewBiHamilton ¶
func NewBiHamilton(a, b, c, d, e, f, g, h *big.Rat) *BiHamilton
NewBiHamilton returns a *BiHamilton with value a+bi+cj+dk+eH+fiH+gjH+hkH.
func (*BiHamilton) Add ¶
func (z *BiHamilton) Add(x, y *BiHamilton) *BiHamilton
Add sets z equal to x+y, and returns z.
func (*BiHamilton) Commutator ¶
func (z *BiHamilton) Commutator(x, y *BiHamilton) *BiHamilton
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*BiHamilton) Conj ¶
func (z *BiHamilton) Conj(y *BiHamilton) *BiHamilton
Conj sets z equal to the conjugate of y, and returns z.
func (*BiHamilton) CrossRatioL ¶
func (z *BiHamilton) CrossRatioL(v, w, x, y *BiHamilton) *BiHamilton
CrossRatioL sets z equal to the left cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*BiHamilton) CrossRatioR ¶
func (z *BiHamilton) CrossRatioR(v, w, x, y *BiHamilton) *BiHamilton
CrossRatioR sets z equal to the right cross-ratio of v, w, x, and y:
(v - x) * Inv(w - x) * (w - y) * Inv(v - y)
Then it returns z.
func (*BiHamilton) Equals ¶
func (z *BiHamilton) Equals(y *BiHamilton) bool
Equals returns true if y and z are equal.
func (*BiHamilton) Inv ¶
func (z *BiHamilton) Inv(y *BiHamilton) *BiHamilton
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*BiHamilton) IsZeroDivisor ¶
func (z *BiHamilton) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor.
func (*BiHamilton) Mul ¶
func (z *BiHamilton) Mul(x, y *BiHamilton) *BiHamilton
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = Mul(j, j) = Mul(k, k) = Mul(H, H) = -1 Mul(i, j) = -Mul(j, i) = +k Mul(i, k) = -Mul(k, i) = -j Mul(i, H) = Mul(H, i) Mul(j, k) = -Mul(k, j) = +i Mul(j, H) = Mul(H, j) Mul(k, H) = Mul(H, k)
This binary operation is noncommutative but associative.
func (*BiHamilton) MöbiusL ¶
func (z *BiHamilton) MöbiusL(y, a, b, c, d *BiHamilton) *BiHamilton
MöbiusL sets z equal to the left Möbius (fractional linear) transform of y:
Inv(y*c + d) * (y*a + b)
Then it returns z.
func (*BiHamilton) MöbiusR ¶
func (z *BiHamilton) MöbiusR(y, a, b, c, d *BiHamilton) *BiHamilton
MöbiusR sets z equal to the right Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*BiHamilton) Neg ¶
func (z *BiHamilton) Neg(y *BiHamilton) *BiHamilton
Neg sets z equal to the negative of y, and returns z.
func (*BiHamilton) Norm ¶
func (z *BiHamilton) Norm() *big.Rat
Norm returns the norm of z. If z = a+bi+cj+dk+eH+fS+gT+hU, then the norm is
(a² + b² + c² + d² - e² - f² - g² - h²)² + 4(ae + bf + cg + dh)²
The norm is always non-negative.
func (*BiHamilton) QuoL ¶
func (z *BiHamilton) QuoL(x, y *BiHamilton) *BiHamilton
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is zero, then QuoL panics.
func (*BiHamilton) QuoR ¶
func (z *BiHamilton) QuoR(x, y *BiHamilton) *BiHamilton
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is zero, then QuoR panics.
func (*BiHamilton) Rats ¶
func (z *BiHamilton) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight rational components of z.
func (*BiHamilton) Real ¶
func (z *BiHamilton) Real() *big.Rat
Real returns the (rational) real part of z.
func (*BiHamilton) Scal ¶
func (z *BiHamilton) Scal(y *BiHamilton, a *big.Rat) *BiHamilton
Scal sets z equal to y scaled by a, and returns z.
func (*BiHamilton) Set ¶
func (z *BiHamilton) Set(y *BiHamilton) *BiHamilton
Set sets z equal to y, and returns z.
func (*BiHamilton) String ¶
func (z *BiHamilton) String() string
String returns the string representation of a BiHamilton value.
If z corresponds to a + bi + cj + dk + eH + fiH + gjH + hkH, then the string is "(a+bi+cj+dk+eH+fiH+gjH+hkH)", similar to complex128 values.
func (*BiHamilton) Sub ¶
func (z *BiHamilton) Sub(x, y *BiHamilton) *BiHamilton
Sub sets z equal to x-y, and returns z.
type BiPerplex ¶
type BiPerplex struct {
// contains filtered or unexported fields
}
A BiPerplex represents a rational biperplex number.
func NewBiPerplex ¶
NewBiPerplex returns a *BiPerplex with value a+bs+cR+dsT.
func (*BiPerplex) CrossRatio ¶
CrossRatio sets z equal to the cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*BiPerplex) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*BiPerplex) IsZeroDivisor ¶
IsZeroDivisor returns true if z is a zero divisor.
func (*BiPerplex) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(s, s) = Mul(T, T) = +1 Mul(s, T) = Mul(T, s)
This binary operation is commutative and associative.
func (*BiPerplex) Möbius ¶
Möbius sets z equal to the Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*BiPerplex) Norm ¶
Norm returns the norm of z. If z = a+bs+cR+dsT, then the norm is
(a² + b² - c² - d²)² - 4(ab - cd)²
This can also be written as
((a + b)² - (c + d)²)((a - b)² - (c + d)²)
In this form, the norm looks similar to the norm of the BiComplex type. The norm can also be written as
(a + b + c + d)(a + b - c - d)(a - b + c - d)(a - b - c + d)
In this form the norm looks similar to Brahmagupta's formula for the area of a cyclic quadrilateral. The norm can be positive, negative, or zero.
func (*BiPerplex) Quad ¶
Quad returns the quadrance of z. If z = a+bs+cR+dsT, then the quadrance is
a² + b² - c² - d² + 2(ab - cd)s
Note that this is a perplex number.
func (*BiPerplex) Quo ¶
Quo sets z equal to the quotient of x and y. If y is a zero divisor, then Quo panics.
type Cayley ¶
type Cayley struct {
// contains filtered or unexported fields
}
A Cayley represents a rational Cayley octonion.
func (*Cayley) Associator ¶
Associator sets z equal to the associator of w, x, and y:
Mul(Mul(w, x), y) - Mul(w, Mul(x, y))
Then it returns z.
func (*Cayley) Commutator ¶
Commutator sets z equal to the commutator of x and y
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*Cayley) Graves ¶
Graves sets z equal to the Gravesian integer a+bi+cj+dk+em+fn+gp+hq, and returns z.
func (*Cayley) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is zero, then Inv panics.
func (*Cayley) Klein ¶
Klein sets z equal to the Kleinian integer (a+½)+(b+½)i+(c+½)j+(d+½)k+(e+½)m+(f+½)n+(g+½)p+(h+½)q, and returns z.
func (*Cayley) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = Mul(j, j) = Mul(k, k) = -1 Mul(m, m) = Mul(n, n) = Mul(p, p) = Mul(q, q) = -1 Mul(i, j) = -Mul(j, i) = +k Mul(i, k) = -Mul(k, i) = -j Mul(i, m) = -Mul(m, i) = +n Mul(i, n) = -Mul(n, i) = -m Mul(i, p) = -Mul(p, i) = -q Mul(i, q) = -Mul(q, i) = +p Mul(j, k) = -Mul(k, j) = +i Mul(j, m) = -Mul(m, j) = +p Mul(j, n) = -Mul(n, j) = +q Mul(j, p) = -Mul(p, j) = -m Mul(j, q) = -Mul(q, j) = -n Mul(k, m) = -Mul(m, k) = +q Mul(k, n) = -Mul(n, k) = -p Mul(k, p) = -Mul(p, k) = +n Mul(k, q) = -Mul(q, k) = -m Mul(m, n) = -Mul(n, m) = +i Mul(m, p) = -Mul(p, m) = +j Mul(m, q) = -Mul(q, m) = +k Mul(n, p) = -Mul(p, n) = -k Mul(n, q) = -Mul(q, n) = +j Mul(p, q) = -Mul(q, p) = -i
This binary operation is noncommutative and nonassociative.
func (*Cayley) Quad ¶
Quad returns the quadrance of z. If z = a+bi+cj+dk+em+fn+gp+hq, then the quadrance is
a² + b² + c² + d² + e² + f² + g² + h²
This is always non-negative.
func (*Cayley) QuoL ¶
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is zero, then QuoL panics.
func (*Cayley) QuoR ¶
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is zero, then QuoR panics.
func (*Cayley) Rats ¶
func (z *Cayley) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight rational components of z.
type Cockle ¶
type Cockle struct {
// contains filtered or unexported fields
}
A Cockle represents a rational Cockle quaternion.
func (*Cockle) Commutator ¶
Commutator sets z equal to the commutator of x and y
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*Cockle) CrossRatioL ¶
CrossRatioL sets z equal to the left cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*Cockle) CrossRatioR ¶
CrossRatioR sets z equal to the right cross-ratio of v, w, x, and y:
(v - x) * Inv(w - x) * (w - y) * Inv(v - y)
Then it returns z.
func (*Cockle) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*Cockle) IsNilpotent ¶
IsNilpotent returns true if z raised to the n-th power vanishes.
func (*Cockle) IsZeroDivisor ¶
IsZeroDivisor returns true if z is a zero divisor.
func (*Cockle) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = -1 Mul(t, t) = Mul(u, u) = +1 Mul(i, t) = -Mul(t, i) = u Mul(u, t) = -Mul(t, u) = i Mul(u, i) = -Mul(i, u) = t
This binary operation is noncommutative but associative.
func (*Cockle) MöbiusL ¶
MöbiusL sets z equal to the left Möbius (fractional linear) transform of y:
Inv(y*c + d) * (y*a + b)
Then it returns z.
func (*Cockle) MöbiusR ¶
MöbiusR sets z equal to the right Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*Cockle) Quad ¶
Quad returns the quadrance of z. If z = a+bi+ct+du, then the quadrance is
a² + b² - c² - d²
This can be positive, negative, or zero.
func (*Cockle) QuoL ¶
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is a zero divisor, then QuoL panics.
func (*Cockle) QuoR ¶
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is a zero divisor, then QuoR panics.
type Complex ¶
type Complex struct {
// contains filtered or unexported fields
}
A Complex represents a rational complex number.
func NewComplex ¶
NewComplex returns a pointer to the Complex value a+bi.
func (*Complex) CrossRatio ¶
CrossRatio sets z equal to the cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*Complex) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is zero, then Inv panics.
func (*Complex) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rule is:
Mul(i, i) = -1
This binary operation is commutative and associative.
func (*Complex) Möbius ¶
Möbius sets z equal to the Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*Complex) Quad ¶
Quad returns the quadrance of z. If z = a+bi, then the quadrance is
a² + b²
This is always non-negative.
func (*Complex) Quo ¶
Quo sets z equal to the quotient of x and y, and returns z. If y is zero, then Quo panics.
type DualComplex ¶
type DualComplex struct {
// contains filtered or unexported fields
}
A DualComplex represents a rational dual-complex number.
func NewDualComplex ¶
func NewDualComplex(a, b, c, d *big.Rat) *DualComplex
NewDualComplex returns a *DualComplex with value a+bi+cΓ+diΓ.
func (*DualComplex) Add ¶
func (z *DualComplex) Add(x, y *DualComplex) *DualComplex
Add sets z equal to x+y, and returns z.
func (*DualComplex) Conj ¶
func (z *DualComplex) Conj(y *DualComplex) *DualComplex
Conj sets z equal to the conjugate of y, and returns z.
func (*DualComplex) CrossRatio ¶
func (z *DualComplex) CrossRatio(v, w, x, y *DualComplex) *DualComplex
CrossRatio sets z equal to the cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*DualComplex) Equals ¶
func (z *DualComplex) Equals(y *DualComplex) bool
Equals returns true if y and z are equal.
func (*DualComplex) Inv ¶
func (z *DualComplex) Inv(y *DualComplex) *DualComplex
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*DualComplex) IsZeroDivisor ¶
func (z *DualComplex) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor.
func (*DualComplex) Mul ¶
func (z *DualComplex) Mul(x, y *DualComplex) *DualComplex
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = -1 Mul(Γ, Γ) = 0 Mul(i, Γ) = Mul(Γ, i)
This binary operation is commutative and associative.
func (*DualComplex) Möbius ¶
func (z *DualComplex) Möbius(y, a, b, c, d *DualComplex) *DualComplex
Möbius sets z equal to the Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*DualComplex) Neg ¶
func (z *DualComplex) Neg(y *DualComplex) *DualComplex
Neg sets z equal to the negative of y, and returns z.
func (*DualComplex) Norm ¶
func (z *DualComplex) Norm() *big.Rat
Norm returns the norm of z. If z = a+bi+cΓ+diΓ, then the norm is
(a² + b²)²
This is always non-negative.
func (*DualComplex) Quad ¶
func (z *DualComplex) Quad() *Complex
Quad returns the quadrance of z. If z = a+bi+cΓ+diΓ, then the quadrance is
a² - b² + 2abi
Note that this is a complex number.
func (*DualComplex) Quo ¶
func (z *DualComplex) Quo(x, y *DualComplex) *DualComplex
Quo sets z equal to the quotient of x and y. If y is a zero divisor, then Quo panics.
func (*DualComplex) Real ¶
func (z *DualComplex) Real() *big.Rat
Real returns the (rational) real part of z.
func (*DualComplex) Scal ¶
func (z *DualComplex) Scal(y *DualComplex, a *big.Rat) *DualComplex
Scal sets z equal to y scaled by a, and returns z.
func (*DualComplex) Set ¶
func (z *DualComplex) Set(y *DualComplex) *DualComplex
Set sets z equal to y, and returns z.
func (*DualComplex) Star ¶
func (z *DualComplex) Star(y *DualComplex) *DualComplex
Star sets z equal to the star conjugate of y, and returns z.
func (*DualComplex) String ¶
func (z *DualComplex) String() string
String returns the string representation of a DualComplex value.
func (*DualComplex) Sub ¶
func (z *DualComplex) Sub(x, y *DualComplex) *DualComplex
Sub sets z equal to x-y, and returns z.
type DualPerplex ¶
type DualPerplex struct {
// contains filtered or unexported fields
}
A DualPerplex represents a rational dual perplex number.
func NewDualPerplex ¶
func NewDualPerplex(a, b, c, d *big.Rat) *DualPerplex
NewDualPerplex returns a *DualPerplex with value a+bs+cΓ+dsΓ.
func (*DualPerplex) Add ¶
func (z *DualPerplex) Add(x, y *DualPerplex) *DualPerplex
Add sets z equal to x+y, and returns z.
func (*DualPerplex) Conj ¶
func (z *DualPerplex) Conj(y *DualPerplex) *DualPerplex
Conj sets z equal to the conjugate of y, and returns z.
func (*DualPerplex) CrossRatio ¶
func (z *DualPerplex) CrossRatio(v, w, x, y *DualPerplex) *DualPerplex
CrossRatio sets z equal to the cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*DualPerplex) Equals ¶
func (z *DualPerplex) Equals(y *DualPerplex) bool
Equals returns true if y and z are equal.
func (*DualPerplex) Inv ¶
func (z *DualPerplex) Inv(y *DualPerplex) *DualPerplex
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*DualPerplex) IsZeroDivisor ¶
func (z *DualPerplex) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor.
func (*DualPerplex) Mul ¶
func (z *DualPerplex) Mul(x, y *DualPerplex) *DualPerplex
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(s, s) = +1 Mul(Γ, Γ) = 0 Mul(s, Γ) = Mul(Γ, s)
This binary operation is commutative and associative.
func (*DualPerplex) Möbius ¶
func (z *DualPerplex) Möbius(y, a, b, c, d *DualPerplex) *DualPerplex
Möbius sets z equal to the Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*DualPerplex) Neg ¶
func (z *DualPerplex) Neg(y *DualPerplex) *DualPerplex
Neg sets z equal to the negative of y, and returns z.
func (*DualPerplex) Norm ¶
func (z *DualPerplex) Norm() *big.Rat
Norm returns the norm of z. If z = a+bs+cΓ+dsΓ, then the norm is
(a² - b²)²
This is always non-negative.
func (*DualPerplex) Quad ¶
func (z *DualPerplex) Quad() *Perplex
Quad returns the quadrance of z. If z = a+bs+cΓ+dsΓ, then the quadrance is
a² + b² + 2abs
Note that this is a perplex number.
func (*DualPerplex) Quo ¶
func (z *DualPerplex) Quo(x, y *DualPerplex) *DualPerplex
Quo sets z equal to the quotient of x and y. If y is a zero divisor, then Quo panics.
func (*DualPerplex) Real ¶
func (z *DualPerplex) Real() *big.Rat
Real returns the (rational) real part of z.
func (*DualPerplex) Scal ¶
func (z *DualPerplex) Scal(y *DualPerplex, a *big.Rat) *DualPerplex
Scal sets z equal to y scaled by a, and returns z.
func (*DualPerplex) Set ¶
func (z *DualPerplex) Set(y *DualPerplex) *DualPerplex
Set sets z equal to y, and returns z.
func (*DualPerplex) Star ¶
func (z *DualPerplex) Star(y *DualPerplex) *DualPerplex
Star sets z equal to the star conjugate of y, and returns z.
func (*DualPerplex) String ¶
func (z *DualPerplex) String() string
String returns the string representation of a DualPerplex value.
func (*DualPerplex) Sub ¶
func (z *DualPerplex) Sub(x, y *DualPerplex) *DualPerplex
Sub sets z equal to x-y, and returns z.
type Hamilton ¶
type Hamilton struct {
// contains filtered or unexported fields
}
A Hamilton represents a rational Hamilton quaternion.
func NewHamilton ¶
NewHamilton returns a pointer to the Hamilton value a+bi+cj+dk.
func (*Hamilton) Commutator ¶
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*Hamilton) CrossRatioL ¶
CrossRatioL sets z equal to the left cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*Hamilton) CrossRatioR ¶
CrossRatioR sets z equal to the right cross-ratio of v, w, x, and y:
(v - x) * Inv(w - x) * (w - y) * Inv(v - y)
Then it returns z.
func (*Hamilton) Hurwitz ¶
Hurwitz sets z equal to the Hurwitz integer (a+½)+(b+½)i+(c+½)j+(d+½)k, and returns z.
func (*Hamilton) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is zero, then Inv panics.
func (*Hamilton) Lipschitz ¶
Lipschitz sets z equal to the Lipschitz integer a+bi+cj+dk, and returns z.
func (*Hamilton) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = Mul(j, j) = Mul(k, k) = -1 Mul(i, j) = -Mul(j, i) = k Mul(j, k) = -Mul(k, j) = i Mul(k, i) = -Mul(i, k) = j
This binary operation is noncommutative but associative.
func (*Hamilton) MöbiusL ¶
MöbiusL sets z equal to the left Möbius (fractional linear) transform of y:
Inv(y*c + d) * (y*a + b)
Then it returns z.
func (*Hamilton) MöbiusR ¶
MöbiusR sets z equal to the right Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*Hamilton) Quad ¶
Quad returns the quadrance of z. If z = a+bi+cj+dk, then the quadrance is
a² + b² + c² + d²
This is always non-negative.
func (*Hamilton) QuoL ¶
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is zero, then QuoL panics.
func (*Hamilton) QuoR ¶
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is zero, then QuoR panics.
type Hyper ¶
type Hyper struct {
// contains filtered or unexported fields
}
A Hyper represents a rational hyper-dual number.
func (*Hyper) CrossRatio ¶
CrossRatio sets z equal to the cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*Hyper) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*Hyper) IsZeroDivisor ¶
IsZeroDivisor returns true if z is a zero divisor.
func (*Hyper) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(α, α) = Mul(Γ, Γ) = 0 Mul(α, Γ) = Mul(Γ, α)
This binary operation is commutative and associative.
func (*Hyper) Möbius ¶
Möbius sets z equal to the Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*Hyper) Norm ¶
Norm returns the norm of z. If z = a+bα+cΓ+dαΓ, then the norm is
(a²)²
This is always non-negative.
func (*Hyper) Quad ¶
Quad returns the quadrance of z. If z = a+bα+cΓ+dαΓ, then the quadrance is
a² + 2abα
Note that this is an infra number.
func (*Hyper) Quo ¶
Quo sets z equal to the quotient of x and y. If y is a zero divisor, then Quo panics.
type Infra ¶
type Infra struct {
// contains filtered or unexported fields
}
An Infra represents a rational infra number.
func (*Infra) CrossRatio ¶
CrossRatio sets z equal to the cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*Infra) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*Infra) IsZeroDivisor ¶
IsZeroDivisor returns true if z is a zero divisor. This is equivalent to z being nilpotent.
func (*Infra) Mul ¶
Mul sets z to the product of x and y, and returns z.
The multiplication rule is:
Mul(α, α) = 0
This binary operation is commutative and associative.
func (*Infra) Möbius ¶
Möbius sets z equal to the Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*Infra) Quad ¶
Quad returns the quadrance of z. If z = a+bα, then the quadrance is
a²
This is always non-negative.
func (*Infra) Quo ¶
Quo sets z equal to the quotient of x and y, and returns z. If y is a zero divisor, then Quo panics.
type InfraCockle ¶
type InfraCockle struct {
// contains filtered or unexported fields
}
An InfraCockle represents a rational infra-Cockle quaternion.
func NewInfraCockle ¶
func NewInfraCockle(a, b, c, d, e, f, g, h *big.Rat) *InfraCockle
NewInfraCockle returns a pointer to the InfraCockle value a+bi+ct+du+eρ+fσ+gτ+hυ.
func (*InfraCockle) Add ¶
func (z *InfraCockle) Add(x, y *InfraCockle) *InfraCockle
Add sets z equal to x+y, and returns z.
func (*InfraCockle) Associator ¶
func (z *InfraCockle) Associator(w, x, y *InfraCockle) *InfraCockle
Associator sets z equal to the associator of w, x, and y:
Mul(Mul(w, x), y) - Mul(w, Mul(x, y))
Then it returns z.
func (*InfraCockle) Commutator ¶
func (z *InfraCockle) Commutator(x, y *InfraCockle) *InfraCockle
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*InfraCockle) Conj ¶
func (z *InfraCockle) Conj(y *InfraCockle) *InfraCockle
Conj sets z equal to the conjugate of y, and returns z.
func (*InfraCockle) Equals ¶
func (z *InfraCockle) Equals(y *InfraCockle) bool
Equals returns true if y and z are equal.
func (*InfraCockle) Inv ¶
func (z *InfraCockle) Inv(y *InfraCockle) *InfraCockle
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*InfraCockle) IsZeroDivisor ¶
func (z *InfraCockle) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor. This is equivalent to z being nilpotent.
func (*InfraCockle) Mul ¶
func (z *InfraCockle) Mul(x, y *InfraCockle) *InfraCockle
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = -1 Mul(t, t) = Mul(u, u) = +1 Mul(ρ, ρ) = Mul(σ, σ) = Mul(τ, τ) = Mul(υ, υ) = 0 Mul(i, t) = -Mul(t, i) = +u Mul(i, u) = -Mul(u, i) = -t Mul(i, ρ) = -Mul(ρ, i) = +σ Mul(i, σ) = -Mul(σ, i) = -ρ Mul(i, τ) = -Mul(τ, i) = -υ Mul(i, υ) = -Mul(υ, i) = +τ Mul(t, u) = -Mul(u, t) = -i Mul(t, ρ) = -Mul(ρ, t) = +τ Mul(t, σ) = -Mul(σ, t) = +υ Mul(t, τ) = -Mul(τ, t) = +ρ Mul(t, υ) = -Mul(υ, t) = +σ Mul(u, ρ) = -Mul(ρ, u) = +υ Mul(u, σ) = -Mul(σ, u) = -τ Mul(u, τ) = -Mul(τ, u) = -σ Mul(u, υ) = -Mul(υ, u) = +ρ Mul(ρ, σ) = Mul(σ, ρ) = 0 Mul(ρ, τ) = Mul(τ, ρ) = 0 Mul(ρ, υ) = Mul(υ, ρ) = 0 Mul(σ, τ) = Mul(τ, σ) = 0 Mul(σ, υ) = Mul(υ, σ) = 0 Mul(τ, υ) = Mul(υ, τ) = 0
This binary operation is noncommutative and nonassociative.
func (*InfraCockle) Neg ¶
func (z *InfraCockle) Neg(y *InfraCockle) *InfraCockle
Neg sets z equal to the negative of y, and returns z.
func (*InfraCockle) Quad ¶
func (z *InfraCockle) Quad() *big.Rat
Quad returns the quadrance of z. If z = a+bi+ct+du+eρ+fσ+gτ+hυ, then the quadrance is
a² + b² - c² - d²
This can be positive, negative, or zero.
func (*InfraCockle) QuoL ¶
func (z *InfraCockle) QuoL(x, y *InfraCockle) *InfraCockle
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is a zero divisor, then QuoL panics.
func (*InfraCockle) QuoR ¶
func (z *InfraCockle) QuoR(x, y *InfraCockle) *InfraCockle
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is a zero divisor, then QuoR panics.
func (*InfraCockle) Rats ¶
func (z *InfraCockle) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight rational components of z.
func (*InfraCockle) Real ¶
func (z *InfraCockle) Real() *big.Rat
Real returns the (rational) real part of z.
func (*InfraCockle) Scal ¶
func (z *InfraCockle) Scal(y *InfraCockle, a *big.Rat) *InfraCockle
Scal sets z equal to y scaled by a, and returns z.
func (*InfraCockle) Set ¶
func (z *InfraCockle) Set(y *InfraCockle) *InfraCockle
Set sets z equal to y, and returns z.
func (*InfraCockle) String ¶
func (z *InfraCockle) String() string
String returns the string representation of an InfraCockle value.
If z corresponds to a + bi + ct + du + eρ + fσ + gτ + hυ, then the string is"(a+bi+ct+du+eρ+fσ+gτ+hυ)", similar to complex128 values.
func (*InfraCockle) Sub ¶
func (z *InfraCockle) Sub(x, y *InfraCockle) *InfraCockle
Sub sets z equal to x-y, and returns z.
type InfraComplex ¶
type InfraComplex struct {
// contains filtered or unexported fields
}
An InfraComplex represents a rational infra-complex number.
func NewInfraComplex ¶
func NewInfraComplex(a, b, c, d *big.Rat) *InfraComplex
NewInfraComplex returns a pointer to the InfraComplex value a+bi+cβ+dγ.
func (*InfraComplex) Add ¶
func (z *InfraComplex) Add(x, y *InfraComplex) *InfraComplex
Add sets z equal to x+y, and returns z.
func (*InfraComplex) Commutator ¶
func (z *InfraComplex) Commutator(x, y *InfraComplex) *InfraComplex
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*InfraComplex) Conj ¶
func (z *InfraComplex) Conj(y *InfraComplex) *InfraComplex
Conj sets z equal to the conjugate of y, and returns z.
func (*InfraComplex) CrossRatioL ¶
func (z *InfraComplex) CrossRatioL(v, w, x, y *InfraComplex) *InfraComplex
CrossRatioL sets z equal to the left cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*InfraComplex) CrossRatioR ¶
func (z *InfraComplex) CrossRatioR(v, w, x, y *InfraComplex) *InfraComplex
CrossRatioR sets z equal to the right cross-ratio of v, w, x, and y:
(v - x) * Inv(w - x) * (w - y) * Inv(v - y)
Then it returns z.
func (*InfraComplex) Dot ¶
func (z *InfraComplex) Dot(y *InfraComplex) *big.Rat
Dot returns the (rational) dot product of z and y.
func (*InfraComplex) Equals ¶
func (z *InfraComplex) Equals(y *InfraComplex) bool
Equals returns true if y and z are equal.
func (*InfraComplex) Generate ¶
Generate returns a random InfraComplex value for quick.Check testing.
func (*InfraComplex) Inv ¶
func (z *InfraComplex) Inv(y *InfraComplex) *InfraComplex
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*InfraComplex) IsZeroDivisor ¶
func (z *InfraComplex) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor. This is equivalent to z being nilpotent.
func (*InfraComplex) Mul ¶
func (z *InfraComplex) Mul(x, y *InfraComplex) *InfraComplex
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = -1 Mul(β, β) = Mul(γ, γ) = 0 Mul(β, γ) = Mul(γ, β) = 0 Mul(i, β) = -Mul(β, i) = γ Mul(γ, i) = -Mul(i, γ) = β
This binary operation is noncommutative but associative.
func (*InfraComplex) MöbiusL ¶
func (z *InfraComplex) MöbiusL(y, a, b, c, d *InfraComplex) *InfraComplex
MöbiusL sets z equal to the left Möbius (fractional linear) transform of y:
Inv(y*c + d) * (y*a + b)
Then it returns z.
func (*InfraComplex) MöbiusR ¶
func (z *InfraComplex) MöbiusR(y, a, b, c, d *InfraComplex) *InfraComplex
MöbiusR sets z equal to the right Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*InfraComplex) Neg ¶
func (z *InfraComplex) Neg(y *InfraComplex) *InfraComplex
Neg sets z equal to the negative of y, and returns z.
func (*InfraComplex) Quad ¶
func (z *InfraComplex) Quad() *big.Rat
Quad returns the quadrance of z. If z = a+bi+cβ+dγ, then the quadrance is
a² + b²
This is always non-negative.
func (*InfraComplex) QuoL ¶
func (z *InfraComplex) QuoL(x, y *InfraComplex) *InfraComplex
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is a zero divisor, then QuoL panics.
func (*InfraComplex) QuoR ¶
func (z *InfraComplex) QuoR(x, y *InfraComplex) *InfraComplex
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is a zero divisor, then QuoR panics.
func (*InfraComplex) Real ¶
func (z *InfraComplex) Real() *big.Rat
Real returns the (rational) real part of z.
func (*InfraComplex) Scal ¶
func (z *InfraComplex) Scal(y *InfraComplex, a *big.Rat) *InfraComplex
Scal sets z equal to y scaled by a, and returns z.
func (*InfraComplex) Set ¶
func (z *InfraComplex) Set(y *InfraComplex) *InfraComplex
Set sets z equal to y, and returns z.
func (*InfraComplex) String ¶
func (z *InfraComplex) String() string
String returns the string representation of an InfraComplex value.
If z corresponds to a + bi + cβ + dγ, then the string is"(a+bi+cβ+dγ)", similar to complex128 values.
func (*InfraComplex) Sub ¶
func (z *InfraComplex) Sub(x, y *InfraComplex) *InfraComplex
Sub sets z equal to x-y, and returns z.
type InfraHamilton ¶
type InfraHamilton struct {
// contains filtered or unexported fields
}
An InfraHamilton represents a rational infra-Hamilton quaternion.
func NewInfraHamilton ¶
func NewInfraHamilton(a, b, c, d, e, f, g, h *big.Rat) *InfraHamilton
NewInfraHamilton returns a pointer to the InfraHamilton value a+bi+cj+dk+eα+fβ+gγ+hδ.
func (*InfraHamilton) Add ¶
func (z *InfraHamilton) Add(x, y *InfraHamilton) *InfraHamilton
Add sets z equal to x+y, and returns z.
func (*InfraHamilton) Associator ¶
func (z *InfraHamilton) Associator(w, x, y *InfraHamilton) *InfraHamilton
Associator sets z equal to the associator of w, x, and y:
Mul(Mul(w, x), y) - Mul(w, Mul(x, y))
Then it returns z.
func (*InfraHamilton) Commutator ¶
func (z *InfraHamilton) Commutator(x, y *InfraHamilton) *InfraHamilton
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*InfraHamilton) Conj ¶
func (z *InfraHamilton) Conj(y *InfraHamilton) *InfraHamilton
Conj sets z equal to the conjugate of y, and returns z.
func (*InfraHamilton) Equals ¶
func (z *InfraHamilton) Equals(y *InfraHamilton) bool
Equals returns true if y and z are equal.
func (*InfraHamilton) Generate ¶
Generate returns a random InfraHamilton value for quick.Check testing.
func (*InfraHamilton) Inv ¶
func (z *InfraHamilton) Inv(y *InfraHamilton) *InfraHamilton
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*InfraHamilton) IsZeroDivisor ¶
func (z *InfraHamilton) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor. This is equivalent to z being nilpotent.
func (*InfraHamilton) Mul ¶
func (z *InfraHamilton) Mul(x, y *InfraHamilton) *InfraHamilton
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = Mul(j, j) = Mul(k, k) = -1 Mul(α, α) = Mul(β, β) = Mul(γ, γ) = Mul(δ, δ) = 0 Mul(i, j) = -Mul(j, i) = +k Mul(i, k) = -Mul(k, i) = -j Mul(i, α) = -Mul(α, i) = +β Mul(i, β) = -Mul(β, i) = -α Mul(i, γ) = -Mul(γ, i) = -δ Mul(i, δ) = -Mul(δ, i) = +γ Mul(j, k) = -Mul(k, j) = +i Mul(j, α) = -Mul(α, j) = +γ Mul(j, β) = -Mul(β, j) = +δ Mul(j, γ) = -Mul(γ, j) = -α Mul(j, δ) = -Mul(δ, j) = -β Mul(k, α) = -Mul(α, k) = +δ Mul(k, β) = -Mul(β, k) = -γ Mul(k, γ) = -Mul(γ, k) = +β Mul(k, δ) = -Mul(δ, k) = -α Mul(α, β) = Mul(β, α) = 0 Mul(α, γ) = Mul(γ, α) = 0 Mul(α, δ) = Mul(δ, α) = 0 Mul(β, γ) = Mul(γ, β) = 0 Mul(β, δ) = Mul(δ, β) = 0 Mul(γ, δ) = Mul(δ, γ) = 0
This binary operation is noncommutative and nonassociative.
func (*InfraHamilton) Neg ¶
func (z *InfraHamilton) Neg(y *InfraHamilton) *InfraHamilton
Neg sets z equal to the negative of y, and returns z.
func (*InfraHamilton) Quad ¶
func (z *InfraHamilton) Quad() *big.Rat
Quad returns the quadrance of z. If z = a+bi+cj+dk+eα+fβ+gγ+hδ, then the quadrance is
a² + b² + c² + d²
This is always non-negative.
func (*InfraHamilton) QuoL ¶
func (z *InfraHamilton) QuoL(x, y *InfraHamilton) *InfraHamilton
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is a zero divisor, then QuoL panics.
func (*InfraHamilton) QuoR ¶
func (z *InfraHamilton) QuoR(x, y *InfraHamilton) *InfraHamilton
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is a zero divisor, then QuoR panics.
func (*InfraHamilton) Rats ¶
func (z *InfraHamilton) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight components of z.
func (*InfraHamilton) Real ¶
func (z *InfraHamilton) Real() *big.Rat
Real returns the (rational) real part of z.
func (*InfraHamilton) Scal ¶
func (z *InfraHamilton) Scal(y *InfraHamilton, a *big.Rat) *InfraHamilton
Scal sets z equal to y scaled by a, and returns z.
func (*InfraHamilton) Set ¶
func (z *InfraHamilton) Set(y *InfraHamilton) *InfraHamilton
Set sets z equal to y, and returns z.
func (*InfraHamilton) String ¶
func (z *InfraHamilton) String() string
String returns the string representation of an InfraHamilton value.
If z corresponds to a + bi + cj + dk + eα + fβ + gγ + hδ, then the string is"(a+bi+cj+dk+eα+fβ+gγ+hδ)", similar to complex128 values.
func (*InfraHamilton) Sub ¶
func (z *InfraHamilton) Sub(x, y *InfraHamilton) *InfraHamilton
Sub sets z equal to x-y, and returns z.
type InfraPerplex ¶
type InfraPerplex struct {
// contains filtered or unexported fields
}
An InfraPerplex represents a rational infra-perplex number.
func NewInfraPerplex ¶
func NewInfraPerplex(a, b, c, d *big.Rat) *InfraPerplex
NewInfraPerplex returns a pointer to the InfraPerplex value a+bs+cτ+dυ.
func (*InfraPerplex) Add ¶
func (z *InfraPerplex) Add(x, y *InfraPerplex) *InfraPerplex
Add sets z equal to x+y, and returns z.
func (*InfraPerplex) Commutator ¶
func (z *InfraPerplex) Commutator(x, y *InfraPerplex) *InfraPerplex
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*InfraPerplex) Conj ¶
func (z *InfraPerplex) Conj(y *InfraPerplex) *InfraPerplex
Conj sets z equal to the conjugate of y, and returns z.
func (*InfraPerplex) CrossRatioL ¶
func (z *InfraPerplex) CrossRatioL(v, w, x, y *InfraPerplex) *InfraPerplex
CrossRatioL sets z equal to the left cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*InfraPerplex) CrossRatioR ¶
func (z *InfraPerplex) CrossRatioR(v, w, x, y *InfraPerplex) *InfraPerplex
CrossRatioR sets z equal to the right cross-ratio of v, w, x, and y:
(v - x) * Inv(w - x) * (w - y) * Inv(v - y)
Then it returns z.
func (*InfraPerplex) Dot ¶
func (z *InfraPerplex) Dot(y *InfraPerplex) *big.Rat
Dot returns the (rational) dot product of z and y.
func (*InfraPerplex) Equals ¶
func (z *InfraPerplex) Equals(y *InfraPerplex) bool
Equals returns true if y and z are equal.
func (*InfraPerplex) Generate ¶
Generate returns a random InfraPerplex value for quick.Check testing.
func (*InfraPerplex) Inv ¶
func (z *InfraPerplex) Inv(y *InfraPerplex) *InfraPerplex
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*InfraPerplex) IsZeroDivisor ¶
func (z *InfraPerplex) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor. This is equivalent to z being nilpotent.
func (*InfraPerplex) Mul ¶
func (z *InfraPerplex) Mul(x, y *InfraPerplex) *InfraPerplex
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(s, s) = +1 Mul(τ, τ) = Mul(υ, υ) = 0 Mul(τ, υ) = Mul(υ, τ) = 0 Mul(s, τ) = -Mul(τ, s) = υ Mul(s, υ) = -Mul(υ, s) = τ
This binary operation is noncommutative but associative.
func (*InfraPerplex) MöbiusL ¶
func (z *InfraPerplex) MöbiusL(y, a, b, c, d *InfraPerplex) *InfraPerplex
MöbiusL sets z equal to the left Möbius (fractional linear) transform of y:
Inv(y*c + d) * (y*a + b)
Then it returns z.
func (*InfraPerplex) MöbiusR ¶
func (z *InfraPerplex) MöbiusR(y, a, b, c, d *InfraPerplex) *InfraPerplex
MöbiusR sets z equal to the right Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*InfraPerplex) Neg ¶
func (z *InfraPerplex) Neg(y *InfraPerplex) *InfraPerplex
Neg sets z equal to the negative of y, and returns z.
func (*InfraPerplex) Quad ¶
func (z *InfraPerplex) Quad() *big.Rat
Quad returns the quadrance of z. If z = a+bs+cτ+dυ, then the quadrance is
a² - b²
This can be positive, negative, or zero.
func (*InfraPerplex) QuoL ¶
func (z *InfraPerplex) QuoL(x, y *InfraPerplex) *InfraPerplex
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is a zero divisor, then QuoL panics.
func (*InfraPerplex) QuoR ¶
func (z *InfraPerplex) QuoR(x, y *InfraPerplex) *InfraPerplex
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is a zero divisor, then QuoR panics.
func (*InfraPerplex) Real ¶
func (z *InfraPerplex) Real() *big.Rat
Real returns the (rational) real part of z.
func (*InfraPerplex) Scal ¶
func (z *InfraPerplex) Scal(y *InfraPerplex, a *big.Rat) *InfraPerplex
Scal sets z equal to y scaled by a, and returns z.
func (*InfraPerplex) Set ¶
func (z *InfraPerplex) Set(y *InfraPerplex) *InfraPerplex
Set sets z equal to y, and returns z.
func (*InfraPerplex) String ¶
func (z *InfraPerplex) String() string
String returns the string representation of an InfraPerplex value.
If z corresponds to a + bs + cτ + dυ, then the string is"(a+bs+cτ+dυ)", similar to complex128 values.
func (*InfraPerplex) Sub ¶
func (z *InfraPerplex) Sub(x, y *InfraPerplex) *InfraPerplex
Sub sets z equal to x-y, and returns z.
type Perplex ¶
type Perplex struct {
// contains filtered or unexported fields
}
A Perplex represents a rational split-complex number.
func NewPerplex ¶
NewPerplex returns a pointer to the Perplex value a+bs.
func (*Perplex) CrossRatio ¶
CrossRatio sets z equal to the cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*Perplex) Idempotent ¶
Idempotent sets z equal to a pointer to an idempotent Perplex.
func (*Perplex) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*Perplex) IsZeroDivisor ¶
IsZeroDivisor returns true if z is a zero divisor.
func (*Perplex) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rule is:
Mul(s, s) = +1
This binary operation is commutative and associative.
func (*Perplex) Möbius ¶
Möbius sets z equal to the Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*Perplex) Quad ¶
Quad returns the quadrance of z. If z = a+bs, then the quadrance is
a² - b²
This can be positive, negative, or zero.
func (*Perplex) Quo ¶
Quo sets z equal to the quotient of x and y, and returns z. If y is a zero divisor, then Quo panics.
type Supra ¶
type Supra struct {
// contains filtered or unexported fields
}
A Supra represents a rational supra number.
func (*Supra) Commutator ¶
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*Supra) CrossRatioL ¶
CrossRatioL sets z equal to the left cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*Supra) CrossRatioR ¶
CrossRatioR sets z equal to the right cross-ratio of v, w, x, and y:
(v - x) * Inv(w - x) * (w - y) * Inv(v - y)
Then it returns z.
func (*Supra) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*Supra) IsZeroDivisor ¶
IsZeroDivisor returns true if z is a zero divisor.
func (*Supra) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(α, α) = Mul(β, β) = Mul(γ, γ) = 0 Mul(α, β) = -Mul(β, α) = γ Mul(β, γ) = Mul(γ, β) = 0 Mul(γ, α) = Mul(α, γ) = 0
This binary operation is noncommutative but associative.
func (*Supra) MöbiusL ¶
MöbiusL sets z equal to the left Möbius (fractional linear) transform of y:
Inv(y*c + d) * (y*a + b)
Then it returns z.
func (*Supra) MöbiusR ¶
MöbiusR sets z equal to the right Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*Supra) Quad ¶
Quad returns the quadrance of z. If z = a+bα+cβ+dγ, then the quadrance is
a²
This is always non-negative.
func (*Supra) QuoL ¶
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is a zero divisor, then QuoL panics.
func (*Supra) QuoR ¶
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is a zero divisor, then QuoR panics.
type SupraComplex ¶
type SupraComplex struct {
// contains filtered or unexported fields
}
A SupraComplex represents a rational supra-complex number.
func NewSupraComplex ¶
func NewSupraComplex(a, b, c, d, e, f, g, h *big.Rat) *SupraComplex
NewSupraComplex returns a pointer to the SupraComplex value a+bi+cα+dβ+eγ+fδ+gε+hζ.
func (*SupraComplex) Add ¶
func (z *SupraComplex) Add(x, y *SupraComplex) *SupraComplex
Add sets z equal to x+y, and returns z.
func (*SupraComplex) Associator ¶
func (z *SupraComplex) Associator(w, x, y *SupraComplex) *SupraComplex
Associator sets z equal to the associator of w, x, and y:
Mul(Mul(w, x), y) - Mul(w, Mul(x, y))
Then it returns z.
func (*SupraComplex) Commutator ¶
func (z *SupraComplex) Commutator(x, y *SupraComplex) *SupraComplex
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*SupraComplex) Conj ¶
func (z *SupraComplex) Conj(y *SupraComplex) *SupraComplex
Conj sets z equal to the conjugate of y, and returns z.
func (*SupraComplex) Equals ¶
func (z *SupraComplex) Equals(y *SupraComplex) bool
Equals returns true if y and z are equal.
func (*SupraComplex) Generate ¶
Generate returns a random SupraComplex value for quick.Check testing.
func (*SupraComplex) Inv ¶
func (z *SupraComplex) Inv(y *SupraComplex) *SupraComplex
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*SupraComplex) IsZeroDivisor ¶
func (z *SupraComplex) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor. This is equivalent to z being nilpotent.
func (*SupraComplex) Mul ¶
func (z *SupraComplex) Mul(x, y *SupraComplex) *SupraComplex
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = -1 Mul(α, α) = Mul(β, β) = Mul(γ, γ) = 0 Mul(δ, δ) = Mul(ε, ε) = Mul(ζ, ζ) = 0 Mul(i, α) = -Mul(α, i) = +β Mul(i, β) = -Mul(β, i) = -α Mul(i, γ) = -Mul(γ, i) = +δ Mul(i, δ) = -Mul(δ, i) = -γ Mul(i, ε) = -Mul(ε, i) = -ζ Mul(i, ζ) = -Mul(ζ, i) = +ε Mul(α, β) = Mul(β, α) = 0 Mul(α, γ) = -Mul(γ, α) = +ε Mul(α, δ) = -Mul(δ, α) = +ζ Mul(α, ε) = Mul(ε, α) = 0 Mul(α, ζ) = Mul(ζ, α) = 0 Mul(β, γ) = -Mul(γ, β) = +ζ Mul(β, δ) = -Mul(δ, β) = -ε Mul(β, ε) = Mul(ε, β) = 0 Mul(β, ζ) = Mul(ζ, β) = 0 Mul(γ, δ) = Mul(δ, γ) = 0 Mul(γ, ε) = Mul(ε, γ) = 0 Mul(γ, ζ) = Mul(ζ, γ) = 0 Mul(δ, ε) = Mul(ε, δ) = 0 Mul(δ, ζ) = Mul(ζ, δ) = 0 Mul(ε, ζ) = Mul(ζ, ε) = 0
This binary operation is noncommutative and nonassociative.
func (*SupraComplex) Neg ¶
func (z *SupraComplex) Neg(y *SupraComplex) *SupraComplex
Neg sets z equal to the negative of y, and returns z.
func (*SupraComplex) Quad ¶
func (z *SupraComplex) Quad() *big.Rat
Quad returns the quadrance of z. If z = a+bi+cα+dβ+eγ+fδ+gε+hζ, then the quadrance is
a² + b²
This is always non-negative.
func (*SupraComplex) QuoL ¶
func (z *SupraComplex) QuoL(x, y *SupraComplex) *SupraComplex
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is a zero divisor, then QuoL panics.
func (*SupraComplex) QuoR ¶
func (z *SupraComplex) QuoR(x, y *SupraComplex) *SupraComplex
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is a zero divisor, then QuoR panics.
func (*SupraComplex) Rats ¶
func (z *SupraComplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight rational components of z.
func (*SupraComplex) Real ¶
func (z *SupraComplex) Real() *big.Rat
Real returns the (rational) real part of z.
func (*SupraComplex) Scal ¶
func (z *SupraComplex) Scal(y *SupraComplex, a *big.Rat) *SupraComplex
Scal sets z equal to y scaled by a, and returns z.
func (*SupraComplex) Set ¶
func (z *SupraComplex) Set(y *SupraComplex) *SupraComplex
Set sets z equal to y, and returns z.
func (*SupraComplex) String ¶
func (z *SupraComplex) String() string
String returns the string representation of a SupraComplex value.
If z corresponds to a + bi + cα + dβ + eγ + fδ + gε + hζ, then the string is"(a+bi+cα+dβ+eγ+fδ+gε+hζ)", similar to complex128 values.
func (*SupraComplex) Sub ¶
func (z *SupraComplex) Sub(x, y *SupraComplex) *SupraComplex
Sub sets z equal to x-y, and returns z.
type SupraPerplex ¶
type SupraPerplex struct {
// contains filtered or unexported fields
}
An SupraPerplex represents a rational supra-perplex number.
func NewSupraPerplex ¶
func NewSupraPerplex(a, b, c, d, e, f, g, h *big.Rat) *SupraPerplex
NewSupraPerplex returns a pointer to the SupraPerplex value a+bs+cρ+dσ+eτ+fυ+gφ+hψ.
func (*SupraPerplex) Add ¶
func (z *SupraPerplex) Add(x, y *SupraPerplex) *SupraPerplex
Add sets z equal to x+y, and returns z.
func (*SupraPerplex) Associator ¶
func (z *SupraPerplex) Associator(w, x, y *SupraPerplex) *SupraPerplex
Associator sets z equal to the associator of w, x, and y:
Mul(Mul(w, x), y) - Mul(w, Mul(x, y))
Then it returns z.
func (*SupraPerplex) Commutator ¶
func (z *SupraPerplex) Commutator(x, y *SupraPerplex) *SupraPerplex
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*SupraPerplex) Conj ¶
func (z *SupraPerplex) Conj(y *SupraPerplex) *SupraPerplex
Conj sets z equal to the conjugate of y, and returns z.
func (*SupraPerplex) Equals ¶
func (z *SupraPerplex) Equals(y *SupraPerplex) bool
Equals returns true if y and z are equal.
func (*SupraPerplex) Generate ¶
Generate returns a random SupraPerplex value for quick.Check testing.
func (*SupraPerplex) Inv ¶
func (z *SupraPerplex) Inv(y *SupraPerplex) *SupraPerplex
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*SupraPerplex) IsZeroDivisor ¶
func (z *SupraPerplex) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor. This is equivalent to z being nilpotent.
func (*SupraPerplex) Mul ¶
func (z *SupraPerplex) Mul(x, y *SupraPerplex) *SupraPerplex
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(s, s) = +1 Mul(ρ, ρ) = Mul(σ, σ) = Mul(τ, τ) = 0 Mul(υ, υ) = Mul(φ, φ) = Mul(ψ, ψ) = 0 Mul(s, ρ) = -Mul(ρ, s) = +σ Mul(s, σ) = -Mul(σ, s) = +ρ Mul(s, τ) = -Mul(τ, s) = +υ Mul(s, υ) = -Mul(υ, s) = +τ Mul(s, φ) = -Mul(φ, s) = -ψ Mul(s, ψ) = -Mul(ψ, s) = -φ Mul(ρ, σ) = Mul(σ, ρ) = 0 Mul(ρ, τ) = -Mul(τ, ρ) = +φ Mul(ρ, υ) = -Mul(υ, ρ) = +ψ Mul(ρ, φ) = Mul(φ, ρ) = 0 Mul(ρ, ψ) = Mul(ψ, ρ) = 0 Mul(σ, τ) = -Mul(τ, σ) = +ψ Mul(σ, υ) = -Mul(υ, σ) = +φ Mul(σ, φ) = Mul(φ, σ) = 0 Mul(σ, ψ) = Mul(ψ, σ) = 0 Mul(τ, υ) = Mul(υ, τ) = 0 Mul(τ, φ) = Mul(φ, τ) = 0 Mul(τ, ψ) = Mul(ψ, τ) = 0 Mul(υ, φ) = Mul(φ, υ) = 0 Mul(υ, ψ) = Mul(ψ, υ) = 0 Mul(φ, ψ) = Mul(ψ, φ) = 0
This binary operation is noncommutative and nonassociative.
func (*SupraPerplex) Neg ¶
func (z *SupraPerplex) Neg(y *SupraPerplex) *SupraPerplex
Neg sets z equal to the negative of y, and returns z.
func (*SupraPerplex) Quad ¶
func (z *SupraPerplex) Quad() *big.Rat
Quad returns the quadrance of z. If z = a+bs+cρ+dσ+eτ+fυ+gφ+hψ, then the quadrance is
a² - b²
This can be positive, negative, or zero.
func (*SupraPerplex) QuoL ¶
func (z *SupraPerplex) QuoL(x, y *SupraPerplex) *SupraPerplex
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is a zero divisor, then QuoL panics.
func (*SupraPerplex) QuoR ¶
func (z *SupraPerplex) QuoR(x, y *SupraPerplex) *SupraPerplex
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is a zero divisor, then QuoR panics.
func (*SupraPerplex) Rats ¶
func (z *SupraPerplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight rational components of z.
func (*SupraPerplex) Real ¶
func (z *SupraPerplex) Real() *big.Rat
Real returns the (rational) real part of z.
func (*SupraPerplex) Scal ¶
func (z *SupraPerplex) Scal(y *SupraPerplex, a *big.Rat) *SupraPerplex
Scal sets z equal to y scaled by a, and returns z.
func (*SupraPerplex) Set ¶
func (z *SupraPerplex) Set(y *SupraPerplex) *SupraPerplex
Set sets z equal to y, and returns z.
func (*SupraPerplex) String ¶
func (z *SupraPerplex) String() string
String returns the string representation of an SupraPerplex value.
If z corresponds to a + bs + cρ + dσ + eτ + fυ + gφ + hψ, then the string is "(a+bs+cρ+dσ+eτ+fυ+gφ+hψ)", similar to complex128 values.
func (*SupraPerplex) Sub ¶
func (z *SupraPerplex) Sub(x, y *SupraPerplex) *SupraPerplex
Sub sets z equal to x-y, and returns z.
type TriComplex ¶
type TriComplex struct {
// contains filtered or unexported fields
}
A TriComplex represents a rational tricomplex number.
func NewTriComplex ¶
func NewTriComplex(a, b, c, d, e, f, g, h *big.Rat) *TriComplex
NewTriComplex returns a *TriComplex with value a+bi+cJ+diJ+eK+fiK+gJK+hiJK.
func (*TriComplex) Add ¶
func (z *TriComplex) Add(x, y *TriComplex) *TriComplex
Add sets z equal to x+y, and returns z.
func (*TriComplex) Conj ¶
func (z *TriComplex) Conj(y *TriComplex) *TriComplex
Conj sets z equal to the conjugate of y, and returns z.
func (*TriComplex) CrossRatio ¶
func (z *TriComplex) CrossRatio(v, w, x, y *TriComplex) *TriComplex
CrossRatio sets z equal to the cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*TriComplex) Equals ¶
func (z *TriComplex) Equals(y *TriComplex) bool
Equals returns true if y and z are equal.
func (*TriComplex) Inv ¶
func (z *TriComplex) Inv(y *TriComplex) *TriComplex
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*TriComplex) IsZeroDivisor ¶
func (z *TriComplex) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor.
func (*TriComplex) Mul ¶
func (z *TriComplex) Mul(x, y *TriComplex) *TriComplex
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = Mul(J, J) = Mul(K, K) = -1 Mul(i, J) = Mul(J, i) Mul(i, K) = Mul(K, i) Mul(J, K) = Mul(K, J)
This binary operation is commutative and associative.
func (*TriComplex) Möbius ¶
func (z *TriComplex) Möbius(y, a, b, c, d *TriComplex) *TriComplex
Möbius sets z equal to the Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*TriComplex) Neg ¶
func (z *TriComplex) Neg(y *TriComplex) *TriComplex
Neg sets z equal to the negative of y, and returns z.
func (*TriComplex) Norm ¶
func (z *TriComplex) Norm() *big.Rat
Norm returns the norm of z. If z = a+bi+cJ+dS, then the norm is
(a² - b² + c² - d²)² + 4(ab + cd)²
This can also be written as
((a - d)² + (b + c)²)((a + d)² + (b - c)²)
The norm is always non-negative.
func (*TriComplex) Quad ¶
func (z *TriComplex) Quad() *BiComplex
Quad returns the quadrance of z. If z = a+bi+cJ+dS, then the quadrance is
a² - b² + c² - d² + 2(ab + cd)i
Note that this is a bicomplex number.
func (*TriComplex) Quo ¶
func (z *TriComplex) Quo(x, y *TriComplex) *TriComplex
Quo sets z equal to the quotient of x and y. If y is a zero divisor, then Quo panics.
func (*TriComplex) Rats ¶
func (z *TriComplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight rational components of z.
func (*TriComplex) Real ¶
func (z *TriComplex) Real() *big.Rat
Real returns the (rational) real part of z.
func (*TriComplex) Scal ¶
func (z *TriComplex) Scal(y *TriComplex, a *big.Rat) *TriComplex
Scal sets z equal to y scaled by a, and returns z.
func (*TriComplex) Set ¶
func (z *TriComplex) Set(y *TriComplex) *TriComplex
Set sets z equal to y, and returns z.
func (*TriComplex) String ¶
func (z *TriComplex) String() string
String returns the string representation of a TriComplex value.
func (*TriComplex) Sub ¶
func (z *TriComplex) Sub(x, y *TriComplex) *TriComplex
Sub sets z equal to x-y, and returns z.
type TriNilplex ¶
type TriNilplex struct {
// contains filtered or unexported fields
}
A TriNilplex represents a rational trinilplex number.
func NewTriNilplex ¶
func NewTriNilplex(a, b, c, d, e, f, g, h *big.Rat) *TriNilplex
NewTriNilplex returns a *TriNilplex with value a+bα+cΓ+dαΓ+eΛ+fαΛ+gΓΛ+hαΓΛ.
func (*TriNilplex) Add ¶
func (z *TriNilplex) Add(x, y *TriNilplex) *TriNilplex
Add sets z equal to x+y, and returns z.
func (*TriNilplex) Conj ¶
func (z *TriNilplex) Conj(y *TriNilplex) *TriNilplex
Conj sets z equal to the conjugate of y, and returns z.
func (*TriNilplex) CrossRatio ¶
func (z *TriNilplex) CrossRatio(v, w, x, y *TriNilplex) *TriNilplex
CrossRatio sets z equal to the cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*TriNilplex) Equals ¶
func (z *TriNilplex) Equals(y *TriNilplex) bool
Equals returns true if y and z are equal.
func (*TriNilplex) Inv ¶
func (z *TriNilplex) Inv(y *TriNilplex) *TriNilplex
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*TriNilplex) IsZeroDivisor ¶
func (z *TriNilplex) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor.
func (*TriNilplex) Mul ¶
func (z *TriNilplex) Mul(x, y *TriNilplex) *TriNilplex
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(α, α) = Mul(Γ, Γ) = Mul(Λ, Λ) = 0 Mul(α, Γ) = Mul(Γ, α) Mul(α, Λ) = Mul(Λ, α) Mul(Γ, Λ) = Mul(Λ, Γ)
This binary operation is commutative and associative.
func (*TriNilplex) Möbius ¶
func (z *TriNilplex) Möbius(y, a, b, c, d *TriNilplex) *TriNilplex
Möbius sets z equal to the Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*TriNilplex) Neg ¶
func (z *TriNilplex) Neg(y *TriNilplex) *TriNilplex
Neg sets z equal to the negative of y, and returns z.
func (*TriNilplex) Norm ¶
func (z *TriNilplex) Norm() *big.Rat
Norm returns the norm of z. If z = a+bα+cΓ+dαΓ+eΛ+fαΛ+gΓΛ+hαΓΛ, then the norm is
((a²)²)²
The norm is always non-negative.
func (*TriNilplex) Quad ¶
func (z *TriNilplex) Quad() *Hyper
Quad returns the quadrance of z. If z = a+bα+cΓ+dαΓ+eΛ+fαΛ+gΓΛ+hαΓΛ, then the quadrance is
a² + 2abα + 2acΓ + 2(ad + bc)αΓ
Note that this is a bicomplex number.
func (*TriNilplex) Quo ¶
func (z *TriNilplex) Quo(x, y *TriNilplex) *TriNilplex
Quo sets z equal to the quotient of x and y. If y is a zero divisor, then Quo panics.
func (*TriNilplex) Rats ¶
func (z *TriNilplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight rational components of z.
func (*TriNilplex) Real ¶
func (z *TriNilplex) Real() *big.Rat
Real returns the (rational) real part of z.
func (*TriNilplex) Scal ¶
func (z *TriNilplex) Scal(y *TriNilplex, a *big.Rat) *TriNilplex
Scal sets z equal to y scaled by a, and returns z.
func (*TriNilplex) Set ¶
func (z *TriNilplex) Set(y *TriNilplex) *TriNilplex
Set sets z equal to y, and returns z.
func (*TriNilplex) String ¶
func (z *TriNilplex) String() string
String returns the string representation of a TriNilplex value.
func (*TriNilplex) Sub ¶
func (z *TriNilplex) Sub(x, y *TriNilplex) *TriNilplex
Sub sets z equal to x-y, and returns z.
type TriPerplex ¶
type TriPerplex struct {
// contains filtered or unexported fields
}
A TriPerplex represents a rational triperplex number.
func NewTriPerplex ¶
func NewTriPerplex(a, b, c, d, e, f, g, h *big.Rat) *TriPerplex
NewTriPerplex returns a *TriPerplex with value a+bs+cT+dsT+eU+fsU+gTU+hsTU.
func (*TriPerplex) Add ¶
func (z *TriPerplex) Add(x, y *TriPerplex) *TriPerplex
Add sets z equal to x+y, and returns z.
func (*TriPerplex) Conj ¶
func (z *TriPerplex) Conj(y *TriPerplex) *TriPerplex
Conj sets z equal to the conjugate of y, and returns z.
func (*TriPerplex) CrossRatio ¶
func (z *TriPerplex) CrossRatio(v, w, x, y *TriPerplex) *TriPerplex
CrossRatio sets z equal to the cross-ratio of v, w, x, and y:
Inv(w - x) * (v - x) * Inv(v - y) * (w - y)
Then it returns z.
func (*TriPerplex) Equals ¶
func (z *TriPerplex) Equals(y *TriPerplex) bool
Equals returns true if y and z are equal.
func (*TriPerplex) Inv ¶
func (z *TriPerplex) Inv(y *TriPerplex) *TriPerplex
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*TriPerplex) IsZeroDivisor ¶
func (z *TriPerplex) IsZeroDivisor() bool
IsZeroDivisor returns true if z is a zero divisor.
func (*TriPerplex) Mul ¶
func (z *TriPerplex) Mul(x, y *TriPerplex) *TriPerplex
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(s, s) = Mul(T, T) = Mul(U, U) = +1 Mul(s, T) = Mul(T, s) Mul(s, U) = Mul(U, s) Mul(T, U) = Mul(U, T)
This binary operation is commutative and associative.
func (*TriPerplex) Möbius ¶
func (z *TriPerplex) Möbius(y, a, b, c, d *TriPerplex) *TriPerplex
Möbius sets z equal to the Möbius (fractional linear) transform of y:
(a*y + b) * Inv(c*y + d)
Then it returns z.
func (*TriPerplex) Neg ¶
func (z *TriPerplex) Neg(y *TriPerplex) *TriPerplex
Neg sets z equal to the negative of y, and returns z.
func (*TriPerplex) Norm ¶
func (z *TriPerplex) Norm() *big.Rat
Norm returns the norm of z. If z = a+bs+cT+dsT+eU+fsU+gTU+hsTU, then the norm is
(a² - b² + c² - d²)² + 4(ab + cd)²
This can also be written as
((a - d)² + (b + c)²)((a + d)² + (b - c)²)
The norm is always non-negative.
func (*TriPerplex) Quad ¶
func (z *TriPerplex) Quad() *BiPerplex
Quad returns the quadrance of z. If z = a+bs+cT+dsT+eU+fsU+gTU+hsTU, then the quadrance is
a² - b² + c² - d² + 2(ab + cd)i
Note that this is a biperplex number.
func (*TriPerplex) Quo ¶
func (z *TriPerplex) Quo(x, y *TriPerplex) *TriPerplex
Quo sets z equal to the quotient of x and y. If y is a zero divisor, then Quo panics.
func (*TriPerplex) Rats ¶
func (z *TriPerplex) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight rational components of z.
func (*TriPerplex) Real ¶
func (z *TriPerplex) Real() *big.Rat
Real returns the (rational) real part of z.
func (*TriPerplex) Scal ¶
func (z *TriPerplex) Scal(y *TriPerplex, a *big.Rat) *TriPerplex
Scal sets z equal to y scaled by a, and returns z.
func (*TriPerplex) Set ¶
func (z *TriPerplex) Set(y *TriPerplex) *TriPerplex
Set sets z equal to y, and returns z.
func (*TriPerplex) String ¶
func (z *TriPerplex) String() string
String returns the string representation of a TriPerplex value.
func (*TriPerplex) Sub ¶
func (z *TriPerplex) Sub(x, y *TriPerplex) *TriPerplex
Sub sets z equal to x-y, and returns z.
type Ultra ¶
type Ultra struct {
// contains filtered or unexported fields
}
An Ultra represents a rational ultra number.
func (*Ultra) Associator ¶
Associator sets z equal to the associator of w, x, and y:
Mul(Mul(w, x), y) - Mul(w, Mul(x, y))
Then it returns z.
func (*Ultra) Commutator ¶
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*Ultra) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*Ultra) IsZeroDivisor ¶
IsZeroDivisor returns true if z is a zero divisor.
func (*Ultra) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(α, α) = Mul(β, β) = Mul(γ, γ) = 0 Mul(δ, δ) = Mul(ε, ε) = Mul(ζ, ζ) = Mul(η, η) = 0 Mul(α, β) = -Mul(β, α) = +γ Mul(α, γ) = Mul(γ, α) = 0 Mul(α, δ) = -Mul(δ, α) = +ε Mul(α, ε) = Mul(ε, α) = 0 Mul(α, ζ) = -Mul(ζ, α) = -η Mul(α, η) = -Mul(η, α) = +ζ Mul(β, γ) = Mul(γ, β) = 0 Mul(β, δ) = -Mul(δ, β) = +ζ Mul(β, ε) = -Mul(ε, β) = +η Mul(β, ζ) = Mul(ζ, β) = 0 Mul(β, η) = Mul(η, β) = 0 Mul(γ, δ) = -Mul(δ, γ) = +η Mul(γ, ε) = Mul(ε, γ) = 0 Mul(γ, ζ) = Mul(ζ, γ) = 0 Mul(γ, η) = Mul(η, γ) = 0 Mul(δ, ε) = Mul(ε, δ) = 0 Mul(δ, ζ) = Mul(ζ, δ) = 0 Mul(δ, η) = Mul(η, δ) = 0 Mul(ε, ζ) = Mul(ζ, ε) = 0 Mul(ε, η) = Mul(η, ε) = 0 Mul(ζ, η) = Mul(η, ζ) = 0
This binary operation is noncommutative and nonassociative.
func (*Ultra) Quad ¶
Quad returns the quadrance of z. If z = a+bα+cβ+dγ+eδ+fε+gζ+hη, then the quadrance is
a²
This is always non-negative.
func (*Ultra) QuoL ¶
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is a zero divisor, then QuoL panics.
func (*Ultra) QuoR ¶
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is a zero divisor, then QuoR panics.
func (*Ultra) Rats ¶
func (z *Ultra) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight rational components of z.
type Zorn ¶
type Zorn struct {
// contains filtered or unexported fields
}
A Zorn represents a rational Zorn octonion.
func (*Zorn) Associator ¶
Associator sets z equal to the associator of w, x, and y:
Mul(Mul(w, x), y) - Mul(w, Mul(x, y))
Then it returns z.
func (*Zorn) Commutator ¶
Commutator sets z equal to the commutator of x and y:
Mul(x, y) - Mul(y, x)
Then it returns z.
func (*Zorn) Inv ¶
Inv sets z equal to the inverse of y, and returns z. If y is a zero divisor, then Inv panics.
func (*Zorn) IsZeroDivisor ¶
IsZeroDivisor returns true if z is a zero divisor.
func (*Zorn) Mul ¶
Mul sets z equal to the product of x and y, and returns z.
The multiplication rules are:
Mul(i, i) = Mul(j, j) = Mul(k, k) = -1 Mul(r, r) = Mul(s, s) = Mul(t, t) = Mul(u, u) = +1 Mul(i, j) = -Mul(j, i) = +k Mul(i, k) = -Mul(k, i) = -j Mul(i, r) = -Mul(r, i) = +s Mul(i, s) = -Mul(s, i) = -r Mul(i, t) = -Mul(t, i) = -u Mul(i, u) = -Mul(u, i) = +t Mul(j, k) = -Mul(k, j) = +i Mul(j, r) = -Mul(r, j) = +t Mul(j, s) = -Mul(s, j) = +u Mul(j, t) = -Mul(t, j) = -r Mul(j, u) = -Mul(u, j) = -s Mul(k, r) = -Mul(r, k) = +u Mul(k, s) = -Mul(s, k) = -t Mul(k, t) = -Mul(t, k) = +s Mul(k, u) = -Mul(u, k) = -r Mul(r, s) = -Mul(s, r) = -i Mul(r, t) = -Mul(t, r) = -j Mul(r, u) = -Mul(u, r) = -k Mul(s, t) = -Mul(t, s) = +k Mul(s, u) = -Mul(u, s) = -j Mul(t, u) = -Mul(u, t) = +i
This binary operation is noncommutative and nonassociative.
func (*Zorn) Quad ¶
Quad returns the quadrance of z. If z = a+bi+cj+dk+er+fs+gt+hu, then the quadrance is
a² + b² + c² + d² - e² - f² - g² - h²
This can be positive, negative, or zero.
func (*Zorn) QuoL ¶
QuoL sets z equal to the left quotient of x and y:
Mul(Inv(y), x)
Then it returns z. If y is a zero divisor, then QuoL panics.
func (*Zorn) QuoR ¶
QuoR sets z equal to the right quotient of x and y:
Mul(x, Inv(y))
Then it returns z. If y is a zero divisor, then QuoR panics.
func (*Zorn) Rats ¶
func (z *Zorn) Rats() (*big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat, *big.Rat)
Rats returns the eight rational components of z.
Source Files
¶
- bicockle.go
- bicomplex.go
- bihamilton.go
- biperplex.go
- cayley.go
- cockle.go
- complex.go
- doc.go
- dualcomplex.go
- dualperplex.go
- hamilton.go
- hyper.go
- infra.go
- infracockle.go
- infracomplex.go
- infrahamilton.go
- infraperplex.go
- laurent.go
- perplex.go
- supra.go
- supracomplex.go
- supraperplex.go
- tricomplex.go
- trinilplex.go
- triperplex.go
- ultra.go
- zorn.go