Compact GCD

by Ricardo Fernández Serrata

Version 8 (September 10, 2021)

Download (24 downloads)

Minified flow that computes the Greatest/Highest Common Divisor/Factor using the optimized Euclidean Algorithm (the division-based, no subtraction)

As a bonus, this is guaranteed to return correct results regardless of input type or value (even if you bypass the Input Dialogs), and it's guaranteed to halt (no infinite loop).

The only problem is, if any value is NaN, the output will be the other value (NaN or not), instead of always NaN (which is the most correct result in that case). For example, GCD(3, NaN) = 3 and GCD(NaN, 2) = 2, both are wrong

4.0 average rating from 1 reviews

5 stars
0
4 stars
1
3 stars
0
2 stars
0
1 star
0
Reports
0

Rate and review within the app in the Community section.