all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#56558] [PATCH] build: Simpler percentage calculation.
@ 2022-07-14 14:58 raingloom
  2022-07-15  8:22 ` Liliana Marie Prikler
  0 siblings, 1 reply; 5+ messages in thread
From: raingloom @ 2022-07-14 14:58 UTC (permalink / raw)
  To: 56558; +Cc: raingloom

* 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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-16 22:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14 14:58 [bug#56558] [PATCH] build: Simpler percentage calculation raingloom
2022-07-15  8:22 ` Liliana Marie Prikler
2022-07-15 10:17   ` Csepp
2022-07-15 10:27     ` Liliana Marie Prikler
2022-07-16 22:04       ` bug#56558: " Csepp

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.