Skip to main content

Module utils

Module utils 

Source
Expand description

Utility functions for arbitrary precision arithmetic.

Functions§

binomial
Compute C(n, k) using arbitrary precision integers.
e
Compute e to the given bit precision.
factorial
Compute n! using arbitrary precision integers.
golden_ratio
Compute the golden ratio to the given bit precision.
is_probably_prime
Check if a large integer is probably prime.
ln2
Compute ln(2) to the given bit precision.
pi
Compute π to the given bit precision.
sqrt2
Compute sqrt(2) to the given bit precision.