Module advtrains_doc_integration.mathutils
Math utilities.
Functions
gcd (...) | Compute the greatest common divider. |
reduce_fraction (num, denom) | Reduce a fraction. |
Functions
- gcd (...)
-
Compute the greatest common divider.
Note that the behavior of this function is undefined if the arguments
include infinity or NaN.
Parameters:
- ... integer The numbers used for the computation.
Returns:
-
integer
The GCD of the given numbers.
- reduce_fraction (num, denom)
-
Reduce a fraction.
Parameters:
- num integer The numerator.
- denom integer The denominator.
Returns:
-
int,int
The reduced fraction.