stylewarning / hypergeometrica

Livin' like it's 1813 (or 1988).
BSD 3-Clause "New" or "Revised" License
30 stars 6 forks source link

Implement sum-of-digits test #1

Open stylewarning opened 5 years ago

stylewarning commented 5 years ago

Implement sum-of-digits test for multiplication.

jwg4 commented 3 years ago

what does this mean?

stylewarning commented 3 years ago

When we multiply two numbers (in base 10), we can verify the output using the "sum of digits test", which is nicely described here. We would want to add this to Hypergeometrica's multiplication routines, at least in hypergeometrica-safe mode, so that big multiplications won't fail un-noticed.

jwg4 commented 3 years ago

ah, so this check would happen within the library code, not in a test.

stylewarning commented 3 years ago

That's correct. It would also be useful within the tests of course.