Just spent a day and a half hunting down a bug that was making me question my sanity. As it turns out, #emacs #lisp's
/ function silently drops the decimal in its result if both of its inputs are integers... so (/ 1 2) evaluates to 0, not 0.5. Granted, this is also the way that C does it, but in my defense, #CommonLisp does not do this.like this
Christian Lynbech
in reply to Jonathan Lamothe • • •Ah yes, the joy of integer division.
Adding a float into the mix is an improvement, but still no match for the numeric tower of CL. I would expect that there is prior art, but few languages that has come after, has the full sophistication of CL math. And this is one of the advantages of dynamic typing.