Calculates the Greatest Common Divisor (GCD) of two numbers using the Euclidean algorithm.
This function is essential for simplifying fractions throughout the maqam analysis system.
It uses the Euclidean algorithm with floating-point precision handling to ensure
accurate results even with small decimal numbers.
The Euclidean algorithm works by repeatedly replacing the larger number with the
remainder of the division until one number becomes effectively zero.
Parameters
a: number
First number (will be converted to absolute value)
b: number
Second number (will be converted to absolute value)
Calculates the Greatest Common Divisor (GCD) of two numbers using the Euclidean algorithm.
This function is essential for simplifying fractions throughout the maqam analysis system. It uses the Euclidean algorithm with floating-point precision handling to ensure accurate results even with small decimal numbers.
The Euclidean algorithm works by repeatedly replacing the larger number with the remainder of the division until one number becomes effectively zero.