Skip to content

sdcoffey/big

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BIG

Big is a simple, immutable wrapper around Go's built-in *big.Float type designed to offer a more user-friendly API and immutability guarantees at the cost of some runtime performance.

Because Big wraps *big.Float, it uses arbitrary-precision binary floating-point arithmetic. It is not a fixed-point decimal or money library. If you need decimal-exact financial arithmetic, use a decimal package with explicit scale and rounding semantics.

Example

Usage is dead simple:

dec := big.NewDecimal(1.24)
addend := big.NewDecimal(3.14)

dec.Add(addend).String() // prints "4.38"

About

A simple wrapper for Golang's big.Float

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors