quot does not work well with real numbers

17 views
Skip to first unread message

jb...@bgpworks.com

unread,
Sep 30, 2021, 3:21:55 AMSep 30
to ClojureScript
(quot 286.3 21.2) returns 12 instead of 13.

I know it is inherently hard problem due to limited precision.

However, the implementation of CLJS-1164 (https://clojure.atlassian.net/browse/CLJS-1164) seems less prune to bug. At least only one division operation is involved there.

I wonder why that patch has been dropped.

It would be better that official `quot` API document mentions about this problem.
Reply all
Reply to author
Forward
0 new messages