|
Dynamic Fraction Library 1.0.0
Reference-counted arbitrary precision rational number library (MIT OR Unlicense)
|
Advanced mathematical functions for arbitrary precision integers. More...
Functions | |
| di_int | di_mod_pow (di_int base, di_int exp, di_int mod) |
| Modular exponentiation: (base^exp) mod mod. | |
| di_int | di_gcd (di_int a, di_int b) |
| Greatest Common Divisor using Euclidean algorithm. | |
| di_int | di_lcm (di_int a, di_int b) |
| Least Common Multiple. | |
| di_int | di_extended_gcd (di_int a, di_int b, di_int *x, di_int *y) |
| Extended Euclidean Algorithm. | |
| di_int | di_sqrt (di_int n) |
| Integer square root using Newton's method. | |
| di_int | di_factorial (uint32_t n) |
| Calculate factorial. | |
Advanced mathematical functions for arbitrary precision integers.
Extended Euclidean Algorithm.
| a | First integer (may be NULL) |
| b | Second integer (may be NULL) |
| x | Pointer to store coefficient x |
| y | Pointer to store coefficient y |
Definition at line 2622 of file dynamic_int.h.
| di_int di_factorial | ( | uint32_t | n | ) |
Calculate factorial.
| n | Non-negative integer |
Definition at line 2350 of file dynamic_int.h.
Greatest Common Divisor using Euclidean algorithm.
| a | First integer (may be NULL) |
| b | Second integer (may be NULL) |
Definition at line 2237 of file dynamic_int.h.
Least Common Multiple.
| a | First integer (may be NULL) |
| b | Second integer (may be NULL) |
Definition at line 2272 of file dynamic_int.h.
Modular exponentiation: (base^exp) mod mod.
| base | Base integer (may be NULL) |
| exp | Exponent integer (may be NULL) |
| mod | Modulus integer (may be NULL) |
Definition at line 2376 of file dynamic_int.h.
Integer square root using Newton's method.
| n | Integer to find square root of (may be NULL) |
Definition at line 2301 of file dynamic_int.h.