math

package
v0.50.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package math provide generic functions working with math.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinomialCoefficient

func BinomialCoefficient(n int, k int) int

BinomialCoefficient or combination, compute number of picking k from n possibilities.

Result is n! / ((n - k)! * k!)

func Factorial

func Factorial(n int) (f int)

Factorial compute the factorial of n.

func StirlingS2

func StirlingS2(n int, k int) int

StirlingS2 The number of ways of partitioning a set of n elements into k nonempty sets (i.e., k set blocks), also called a Stirling set number.

For example, the set {1,2,3} can be partitioned into three subsets in one way: {{1},{2},{3}}; into two subsets in three ways: {{1,2},{3}}, {{1,3},{2}}, and {{1},{2,3}}; and into one subset in one way: {{1,2,3}}.

Ref: http://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html

Types

This section is empty.

Directories

Path Synopsis
Package big extends the capabilities of standard "math/big" package by adding custom global precision to Float and Rat; and global rounding mode, and bits precision to Float.
Package big extends the capabilities of standard "math/big" package by adding custom global precision to Float and Rat; and global rounding mode, and bits precision to Float.

Jump to

Keyboard shortcuts

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