Incorrect lcm result
Closed this issue · 5 comments
sgerace commented
I recently ran into a case where lcm
was returning the incorrect result. The numbers 186028, 193052 and 144624, as computed by:
const lcm = require('compute-lcm');
console.log(lcm(186028, 193052, 144624));
reports the result 108206102374928, however the correct answer is 324618307124784.
kgryte commented
kgryte commented
This bug is not present in the stdlib
implementation.
We will, however, push a patch to gcd
.
kgryte commented
kgryte commented
The gcd
dep version has been updated, a test case added, and a new version published. Closing as resolved.
Thank you, @sgerace, for reporting and @Planeshifter for fixing.