Documentation ¶
Index ¶
- func BigCeil(z *decimal.Big, n int) *decimal.Big
- func BigFloor(z *decimal.Big, n int) *decimal.Big
- func BigRound(z *decimal.Big, n int) *decimal.Big
- func BigScale(z *decimal.Big, n int) *decimal.Big
- func DecimalCeil(z decimal.Decimal, n int) decimal.Decimal
- func DecimalFloor(z decimal.Decimal, n int) decimal.Decimal
- func DecimalRound(z decimal.Decimal, n int) decimal.Decimal
- func DecimalScale(z decimal.Decimal, n int) decimal.Decimal
- func StrCeil(numStr interface{}, n int) string
- func StrFloor(numStr interface{}, n int) string
- func StrRound(numStr interface{}, n int) string
- func StrScale(numStr interface{}, n int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecimalRound ¶
四舍五入,正数时数值舍变小入变大,负数时数值舍变大入变小
func DecimalScale ¶
直接舍去,正数时数值变小,负数时数值变大
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package decimal provides a high-performance, arbitrary precision, floating-point decimal library.
|
Package decimal provides a high-performance, arbitrary precision, floating-point decimal library. |
internal/arith
Package arith provides performance-sensitive arithmetic operations.
|
Package arith provides performance-sensitive arithmetic operations. |
internal/c
Package c provides internal constants.
|
Package c provides internal constants. |
math
Package math implements various useful mathematical functions and constants.
|
Package math implements various useful mathematical functions and constants. |
misc
Package misc contains miscellaneous decimal routes.
|
Package misc contains miscellaneous decimal routes. |
suite
Package suite provides a simple API for parsing and using IBM Labs' "Floating-Point Test-Suite for IEEE" This package is deprecated and will be removed in the next major version.
|
Package suite provides a simple API for parsing and using IBM Labs' "Floating-Point Test-Suite for IEEE" This package is deprecated and will be removed in the next major version. |
Click to show internal directories.
Click to hide internal directories.