all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@ist.tugraz.at>
To: raingloom <raingloom@riseup.net>, 56558@debbugs.gnu.org
Subject: [bug#56558] [PATCH] build: Simpler percentage calculation.
Date: Fri, 15 Jul 2022 10:22:16 +0200	[thread overview]
Message-ID: <4259f9de2b793af8d39647800d6dec0d377f02d5.camel@ist.tugraz.at> (raw)
In-Reply-To: <20220714145851.20305-1-raingloom@riseup.net>

Am Donnerstag, dem 14.07.2022 um 16:58 +0200 schrieb 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))
I am fairly certain that this changes the semantics of %.  Try for
example (% 23 24).

Cheers




  reply	other threads:[~2022-07-15  8:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 14:58 [bug#56558] [PATCH] build: Simpler percentage calculation raingloom
2022-07-15  8:22 ` Liliana Marie Prikler [this message]
2022-07-15 10:17   ` Csepp
2022-07-15 10:27     ` Liliana Marie Prikler
2022-07-16 22:04       ` bug#56558: " Csepp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4259f9de2b793af8d39647800d6dec0d377f02d5.camel@ist.tugraz.at \
    --to=liliana.prikler@ist.tugraz.at \
    --cc=56558@debbugs.gnu.org \
    --cc=raingloom@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.