go-float-decimal

command module
v0.0.0-...-b429d2c Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

README

go-float-decimal

Example usage of float and decimal in Golang

Examples

165 * 1.40
float64 >>> 230.9999999999999716
decimal >>> 231
1.01 - 0.99
float64 >>> 0.020000000000000017763568
decimal >>> 0.020000000000000018
>>> 1e16 * (1.01 - 0.99)
float64 >>> 200000000000000.1875000000000000
decimal >>> 200000000000000
>>> 1e16 * (1.01 - 0.99) - 0.01
float64 >>> 200000000000000.1875000000000000
decimal >>> 199999999999999.99

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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