Wizard.Math
Wizard’s Mathemagic functions
Summary↑
combination(n, k) | combination(n, k) - produces n choose k |
e() | Euler’s number (lel) |
factorial(n) | factorial(n) - produces n! |
gcd(a, b) | Produces the greatest common divsor (GCD) of a and b TODO: fix negative arguments |
log(b \\ e(), n) | log(b, n) - produces log_b n with default base of e |
nth_root(a, n) | nth_root(a, n) - produces the nth root of a |
permutation(n, k) | permutation(n, k) - produces k-permutations of n |
pi() | Pi (lel) |
pow(x, y) | pow(x, y) - produces x to the yth power TODO: fix decimal to fraction conversion the current version creates massive runtimes |
sqrt(n) | sqrt(n) - produces the square root of n
|
sum(list) | sum(list) - produces the sum of all the elements in a list |
Functions
Specs:
- combination(non_neg_integer, non_neg_integer) :: non_neg_integer
combination(n, k) - produces n choose k
Euler’s number (lel)
Specs:
- factorial(non_neg_integer) :: non_neg_integer
factorial(n) - produces n!
Specs:
- gcd(integer, integer) :: integer
Produces the greatest common divsor (GCD) of a and b TODO: fix negative arguments
Specs:
- log(number, number) :: number
log(b, n) - produces log_b n with default base of e
Specs:
- nth_root(number, non_neg_integer) :: number
nth_root(a, n) - produces the nth root of a
Specs:
- permutation(non_neg_integer, non_neg_integer) :: non_neg_integer
permutation(n, k) - produces k-permutations of n
Pi (lel)
Specs:
- pow(number, integer) :: number
pow(x, y) - produces x to the yth power TODO: fix decimal to fraction conversion the current version creates massive runtimes
Specs:
- sqrt(number) :: number
sqrt(n) - produces the square root of n
- wraps the sqrt(s,n,x) function for cleaner use
Specs:
- sum(list) :: number
sum(list) - produces the sum of all the elements in a list