Hacker News new | ask | show | jobs
by apoorvgarg 2680 days ago
What would be the signature of your gcd function ?
1 comments

Numerator, denominator?
For GCD? I would find those names very misleading since semantically the order of the arguments to GCD is irrelevant (even if in the implementation you typically mod by b there's no reason you couldn't mod by a).
This is not mathematically correct. Those names would be pretty misleading, actually.
Good luck with any bigger equation then