float

package
v0.0.0-...-d109a9a Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Float package contains helpful functions for working with floating point numbers.

A Note on Floating Point Numbers

Floating point numbers are a poor choice for financial calculations due to rounding errors. However, the calculations in this module are intended for rough estimates rather than precise accounting.

Index

Constants

View Source
const (
	Epsilon = 1e-9
	Penny   = 0.01
)

Variables

This section is empty.

Functions

func InDelta

func InDelta(x, y, delta float64) bool

func Round

func Round(val float64, precision int) float64

func RoundUp

func RoundUp(val float64, precision int) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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