mathut

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 4 Imported by: 6

README

mathut

provides utilities to convert formats

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FmtFloat

func FmtFloat(val float64) string

FmtFloat formats a float to string

func FmtFloatExponentiation

func FmtFloatExponentiation(val float64) string

FmtFloatExponentiation formats float using exponentiation to string

func FmtFloatWithPrecision

func FmtFloatWithPrecision(val float64, precision int) string

FmtFloatWithPrecision formats a float to precision to string

func FmtInt

func FmtInt(val int) string

FmtInt formats int to string

func IntSize

func IntSize() int

func Median

func Median(vals []float64) (float64, error)

Median returns percentile rounded to 4 positions after decimal

func ParseFloat

func ParseFloat(val string, sz int) (float64, error)

ParseFloat size 32 or 64

func ParseInt

func ParseInt(val string) int64

func PercentDiff

func PercentDiff(val1, val2 float64) float64

PercentDiff percentage difference between 2 values

func Percentile

func Percentile(vals []float64, percentile float64) (float64, error)

Percentile returns percentile rounded to 4 positions after decimal

i.e.
	Median percentile = .5
	90th Percentile	  = .90
	99th Percentile	  = .99

func Round

func Round(x, unit float64) float64

Round

Types

This section is empty.

Jump to

Keyboard shortcuts

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