Documentation ¶
Index ¶
- Variables
- func IsZero(d *Decimal) bool
- func SetPrecision(p uint32)
- func Text(d *Decimal) string
- type Decimal
- func (x *Decimal) Abs() *Decimal
- func (x *Decimal) Add(y *Decimal) *Decimal
- func (x *Decimal) Cbrt() *Decimal
- func (x *Decimal) Ceil() *Decimal
- func (x *Decimal) Div(y *Decimal) *Decimal
- func (x *Decimal) DivInt(y *Decimal) *Decimal
- func (x *Decimal) DivRem(y *Decimal) *Decimal
- func (x *Decimal) Equal(y *Decimal) bool
- func (x *Decimal) Floor() *Decimal
- func (x *Decimal) GreaterThan(y *Decimal) bool
- func (x *Decimal) LessThan(y *Decimal) bool
- func (x *Decimal) Mul(y *Decimal) *Decimal
- func (x *Decimal) Neg() *Decimal
- func (x *Decimal) Pow(y *Decimal) *Decimal
- func (x *Decimal) Quantize(exp int32) *Decimal
- func (x *Decimal) Sqrt() *Decimal
- func (x *Decimal) Sub(y *Decimal) *Decimal
Constants ¶
This section is empty.
Variables ¶
View Source
var Zero = &Decimal{}
Functions ¶
Types ¶
type Decimal ¶
type Decimal struct {
apd.Decimal
}
func NewFromString ¶
NewFromString creates a new decimal from s.
func (*Decimal) GreaterThan ¶
GreaterThan compares x and y and returns true if x > y.
Click to show internal directories.
Click to hide internal directories.