You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/RocsSun/maths

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/RocsSun/maths

v0.0.0-20220625073527-a0cb12ca12a5
Source
Go
Version published
Created
Source

maths

GitHub go.mod Go version GitHub Go codecov GitHub language count

Some encapsulation of mathematical methods.

install and import.

go version >= 1.18

go get -u github.com/RocsSun/maths

import "github.com/RocsSun/maths"

functions

func ArithmeticAverage[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

Calculate the arithmetic mean of the array

func PopulationVariance[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

Calculate the total variance of the array

func SampleVariance[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

Calculate the sample variance of the array

func OverallStandardDeviation[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

Calculate the overall standard deviation of the array.

func SampleStandardDeviation[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

Calculate the sample standard deviation of the array.

func Sum[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

Calculate cumulative sum

func EachReduceAvgSquareSums[args int | int8 | int16 | int32 | int64 | float64 | float32](nums []args) float64

Calculate the sum of the squares of each number minus the average.

参与贡献

Welcome to add functions.

FAQs

Package last updated on 25 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts