Path: blob/master/build/pkgs/ecl/patches/infloop.patch
8820 views
--- a/src/lsp/format.lsp1+++ b/src/lsp/format.lsp2@@ -196,6 +196,20 @@3;; Note that we have to compute the exponential _every_ _time_ in the loop4;; because multiplying just by 10.0l0 every time would lead to a greater5;; loss of precission.6+ (let ((ex (round (* exponent #.(log 2l0 10)))))7+ (declare (fixnum ex))8+ (if (minusp ex)9+ (loop for y of-type long-float10+ = (* x (the long-float (expt 10.0l0 (- ex))))11+ while (<= y 0.1l0)12+ do (decf ex)13+ finally (return (values y (the fixnum (+ delta ex)))))14+ (loop for y of-type long-float15+ = (/ x (the long-float (expt 10.0l0 ex)))16+ while (> y 1.0l0)17+ do (incf ex)18+ finally (return (values y (the fixnum (+ delta ex)))))))19+ #+(or)20(loop with ex of-type fixnum21= (round (* exponent #.(log 2l0 10)))22for y of-type long-float232425