guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#56558] [PATCH] build: Simpler percentage calculation.


From: raingloom
Subject: [bug#56558] [PATCH] build: Simpler percentage calculation.
Date: Thu, 14 Jul 2022 16:58:51 +0200

* build-aux/compile-all (%): Simpler calculation that avoids intermediate float.
---
 build-aux/compile-all.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-aux/compile-all.scm b/build-aux/compile-all.scm
index 9ffbce43ad..6fdbe0dea8 100644
--- a/build-aux/compile-all.scm
+++ b/build-aux/compile-all.scm
@@ -89,7 +89,7 @@ (define (parallel-job-count*)
 
 (define (% completed total)
   "Return the completion percentage of COMPLETED over TOTAL as an integer."
-  (inexact->exact (round (* 100. (/ completed total)))))
+  (quotient (* 100 completed) total))
 
 ;; Install a SIGINT handler to give unwind handlers in 'compile-file' an
 ;; opportunity to run upon SIGINT and to remove temporary output files.
-- 
2.37.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]