decimalutils

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BigCeil

func BigCeil(z *decimal.Big, n int) *decimal.Big

天花板数,数值变大

func BigFloor

func BigFloor(z *decimal.Big, n int) *decimal.Big

地板数,数值变小

func BigRound

func BigRound(z *decimal.Big, n int) *decimal.Big

四舍五入,正数时数值舍变小入变大,负数时数值舍变大入变小

func BigScale

func BigScale(z *decimal.Big, n int) *decimal.Big

直接舍去,正数时数值变小,负数时数值变大

func DecimalCeil

func DecimalCeil(z decimal.Decimal, n int) decimal.Decimal

天花板数,数值变大

func DecimalFloor

func DecimalFloor(z decimal.Decimal, n int) decimal.Decimal

地板数,数值变小

func DecimalRound

func DecimalRound(z decimal.Decimal, n int) decimal.Decimal

四舍五入,正数时数值舍变小入变大,负数时数值舍变大入变小

func DecimalScale

func DecimalScale(z decimal.Decimal, n int) decimal.Decimal

直接舍去,正数时数值变小,负数时数值变大

func StrCeil

func StrCeil(numStr interface{}, n int) string

天花板数,数值变大

func StrFloor

func StrFloor(numStr interface{}, n int) string

地板数,数值变小

func StrRound

func StrRound(numStr interface{}, n int) string

四舍五入,正数时数值舍变小入变大,负数时数值舍变大入变小

func StrScale

func StrScale(numStr interface{}, n int) string

直接舍去,正数时数值变小,负数时数值变大

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL