你好,
希望core.typed是正确的分类,没有“核心”可选项
Clojure 1.10.1
(with-precision 4 1.23456) ;; 1.23456
(with-precision 4 1.23456M) ;; 1.23456M
(with-precision 4 (BigDecimal. 1.23456)) ;; 1.2345600000000001017497197608463466167449951171875M
(with-precision 4 (* 1 (BigDecimal. 1.23456))) ;; 1.235M
(with-precision 4 (+ 0 (BigDecimal. 1.23456))) ;; 1.235M
似乎只有当数字作为乘法或加法的结果提供时,它才按预期工作
敬礼,
Daniel