Documentation ¶
Index ¶
- Constants
- type BigFloat
- func (bf *BigFloat) Abs(a BigFloat)
- func (bf *BigFloat) Add(a BigFloat, b BigFloat)
- func (bf *BigFloat) BF() big.Float
- func (bf *BigFloat) Ceil() (*BigFloat, error)
- func (bf *BigFloat) Cmp(a BigFloat) int
- func (bf *BigFloat) Convert(f *big.Float) error
- func (bf *BigFloat) Copy(newBf *BigFloat) error
- func (bf *BigFloat) CreateFromString(s string, mode big.RoundingMode) error
- func (bf *BigFloat) Div(a BigFloat, b BigFloat)
- func (bf *BigFloat) Float() *big.Float
- func (bf *BigFloat) Floor() (*BigFloat, error)
- func (bf BigFloat) MarshalBinary() (data []byte, err error)
- func (bf BigFloat) MarshalJSON() ([]byte, error)
- func (bf *BigFloat) Mul(a BigFloat, b BigFloat)
- func (bf *BigFloat) Round(decimal uint, roundType RoundType) (*BigFloat, error)
- func (bf *BigFloat) Scan(src interface{}) error
- func (bf *BigFloat) SetInt(i *bigint.BigInt, mode big.RoundingMode) error
- func (bf *BigFloat) String() string
- func (bf *BigFloat) Sub(a BigFloat, b BigFloat)
- func (bf *BigFloat) UnmarshalBinary(data []byte) error
- func (bf *BigFloat) UnmarshalJSON(src []byte) error
- func (bf BigFloat) Value() (driver.Value, error)
- type RoundType
- type Slice
Constants ¶
View Source
const ( ToNearestEven big.RoundingMode = iota // == IEEE 754-2008 roundTiesToEven ToNearestAway // == IEEE 754-2008 roundTiesToAway ToZero // == IEEE 754-2008 roundTowardZero AwayFromZero // no IEEE 754-2008 equivalent ToNegativeInf // == IEEE 754-2008 roundTowardNegative ToPositiveInf // == IEEE 754-2008 roundTowardPositive )
These constants define supported rounding modes.
View Source
const AutoPrec = 512 // 256 -> decimal 32 512 -> decimal 78
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigFloat ¶
type BigFloat struct {
// contains filtered or unexported fields
}
func (*BigFloat) CreateFromString ¶
func (bf *BigFloat) CreateFromString(s string, mode big.RoundingMode) error
func (BigFloat) MarshalBinary ¶ added in v0.7.4
func (BigFloat) MarshalJSON ¶
@todo xml protobuf ...
func (*BigFloat) UnmarshalBinary ¶ added in v0.7.4
func (*BigFloat) UnmarshalJSON ¶ added in v0.6.5
Click to show internal directories.
Click to hide internal directories.