Yikes. In #python, (-7) % 4 == 1 but Decimal(-7) % Decimal(4) == Decimal('-3'). That's really confusing.
miniblog.
Related Posts
Interestingly, Emacs lisp considers the literal 1. to be an integer literal, whereas most languages consider a decimal point to always mean a floating point number.
Elegant Pharo Code: https://medium.com/@svenvc/elegant-pharo-code-bb590f0856d0 -- I was once asked to work out decimal digit lengths of factorials in an interview.