Module rdcl_aoc_helpers::math

source ·
Expand description

Math.

Modules

Functions

The absolute difference between two numbers.
Find t and s, such that ta + sb = gcd(p, q).
Computes the greatest common divisor for numbers a and b. TODO: May return negative values.
Computes the least common multiple of a and b.
Solve the chinese remainder theorem for (n1, a1) and (n2, a2). We assume that:
The taxi cab distance between two 2D points.
The taxi cab distance between two 3D points.
The taxi cab distance between two 4D points.