Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kartmaan/math-functions-rust

Some math functions in Rust
https://github.com/kartmaan/math-functions-rust

binomial-coefficient combinations equation factorial fibonacci math math-functions mathematics prime-numbers probability

Last synced: 30 days ago
JSON representation

Some math functions in Rust

Awesome Lists containing this project

README

        

# math-functions-rust
Some math functions in Rust

## proba
Probability functions
- `proba_bool`: Tests a probability by returning a bool
- `proba_some`: Tests a probability by returning an Option
- `proba_result`: Tests a probability by returning a Result
- `proba_attempts`: The function tests a chosen probability, several attempts (with prints) will be made until the probability is realized.

## prime_gen
Generates prime numbers
- `is_prime`: Determines if a number is prime

## fibonacci
Generates and checks Fibonacci numbers
- `fibo-gen`: Generates the first k Fibonacci numbers in a vector.
- `is_fibo`: Checks if a number is a Fibonacci number

## combinations
Number of possible combinations in a given set
- `binomial_combi`: Returns the binomial coefficient, which represents the number of ways to choose k elements from n elements, without repetition.
- `multiset_combi`: Returns the number of multi-set combinations of k elements among n elements, which represents the number of ways to choose k elements among n elements with possible repetition.