number

package
v0.0.0-...-3e6c4c2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcAverage

func CalcAverage(data Avg) float64

计算平均数

func CalcDigist

func CalcDigist(n float64) int

判断有多少位精度

func CalcFeasibleRegion

func CalcFeasibleRegion(x []float64) []float64

计算一阶差分

func CalcNormsdist

func CalcNormsdist(a float64) float64

标准正态分布的累积密度函数

func CalcVariance

func CalcVariance(data Variance) float64

计算方差

func FloorOrCeil

func FloorOrCeil(n int, raw float64, isUp bool) float64

向上或者向下按照有效位数取整 n为有效位数 raw为原始数字 isUp是否向上取整,否则为向下取整

func Ln

func Ln(n float64) float64

func Min

func Min(a1, a2 float64) float64

* Return the min value between a1 and a2

func MinFloat64N

func MinFloat64N(aN ...float64) float64

* Return the min value between a1 to aN

func MinN

func MinN(aN ...int) int

* Return the min value between a1 to aN

func RandomInt

func RandomInt(max int) int

* Return random int value between 0 and max-1

func Round

func Round(f float64, n int) float64

按照指定精度位数向上或者向下取整

Types

type Avg

type Avg Variance

type Variance

type Variance interface {
	Len() int
	Get(i int) float64
}

Jump to

Keyboard shortcuts

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