Documentation ¶
Index ¶
- Constants
- type Num
- func (n Num) Abs() Num
- func (n Num) Array() [4]uint64
- func (n Num) BigInt() *big.Int
- func (n Num) FitsInPrecision(prec int32) bool
- func (n Num) IncreaseScaleBy(increase int32) Num
- func (n Num) Less(other Num) bool
- func (n Num) LowBits() uint64
- func (n Num) Negate() Num
- func (n Num) ReduceScaleBy(reduce int32, round bool) Num
- func (n Num) Rescale(original, newscale int32) (out Num, err error)
- func (n Num) Sign() int
- func (n Num) ToFloat32(scale int32) float32
- func (n Num) ToFloat64(scale int32) float64
Constants ¶
View Source
const ( MaxPrecision = 76 MaxScale = 76 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Num ¶
type Num struct {
// contains filtered or unexported fields
}
func FromBigInt ¶
func FromDecimal128 ¶
func FromDecimal128(n decimal128.Num) Num
func New ¶
New returns a new signed 256-bit integer value where x1 contains the highest bits with the rest of the values in order down to the lowest bits
ie: New(1, 2, 3, 4) returns with the elements in little-endian order {4, 3, 2, 1} but each value is still represented as the native endianness
func (Num) FitsInPrecision ¶
func (Num) IncreaseScaleBy ¶
Click to show internal directories.
Click to hide internal directories.