bigger

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ROUND_UP = RoundingMode(iota)
	ROUND_DOWN
	ROUND_CEILING
	ROUND_FLOOR
	ROUND_HALF_UP
	ROUND_HALF_DOWN
	ROUND_HALF_EVEN
	ROUND_UNNECESSARY
)
View Source
const (
	MAX_INT32 = types.Int(0x7fffffff)
	MAX_INT64 = types.Long(0x7fffffffffffffff)
	MIN_INT32 = ^MAX_INT32
	MIN_INT64 = ^MAX_INT64
)

Variables

View Source
var (
	ZERO          = newBigInteger([]types.Int{0}, 0)
	ONE, TWO, TEN *bigInteger
	NEGATIVE_ONE  = BigIntegerValueOf(-1)
)

Functions

func BigDecimalValueOf

func BigDecimalValueOf(val types.Long) *bigDecimal

func BigIntegerValueOf

func BigIntegerValueOf(val types.Long) *bigInteger

BigIntegerValueOf if |val| <= 16, return posConst cache

func Init

func Init()

func NewBigDecimalString

func NewBigDecimalString(val string) *bigDecimal

func NewBigIntegerBytes

func NewBigIntegerBytes(val []byte) *bigInteger

func NewBigIntegerLong

func NewBigIntegerLong(val types.Long) *bigInteger

func NewBigIntegerString

func NewBigIntegerString(val string) *bigInteger

func NewBigIntegerStringRadix

func NewBigIntegerStringRadix(val string, radix types.Int) *bigInteger

func NumberOfLeadingZeros

func NumberOfLeadingZeros(i types.Int) types.Int

func NumberOfLeadingZerosForLong

func NumberOfLeadingZerosForLong(i types.Long) types.Int

func NumberOfTrailingZeros

func NumberOfTrailingZeros(i types.Int) types.Int

Types

type RoundingMode

type RoundingMode types.Int

Jump to

Keyboard shortcuts

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