numeric

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Eps is the machine precision.
	Eps float64 = math.Nextafter(1.0, 2.0) - 1.0
)

Functions

func Equal

func Equal(x, y float64) bool

Equal checks the equality of two floating point values, up to 1 unit in the last place, using machine precision.

func EqualEps

func EqualEps(x, y, eps float64) bool

EqualEps checks the equality of two floating point values, up to 1 unit in the last place, using eps as the precision.

func EqualEpsUlp

func EqualEpsUlp(x, y, eps float64, ulp int) bool

EqualEpsUlp checks the equality of two floating point values, up to ulp units in the last place, using eps as the precision.

Types

This section is empty.

Jump to

Keyboard shortcuts

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