From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: Re: (inf) min max Date: Tue, 28 Sep 2021 11:55:06 +0200 Message-ID: References: <20210928083156.GE14380@tuxteam.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f98d0005cd0b352c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23944"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel To: tomas@tuxteam.de Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Sep 28 11:56:09 2021 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mV9qK-000609-QV for guile-devel@m.gmane-mx.org; Tue, 28 Sep 2021 11:56:08 +0200 Original-Received: from localhost ([::1]:42284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mV9qI-0006Ig-Vq for guile-devel@m.gmane-mx.org; Tue, 28 Sep 2021 05:56:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV9pY-0006IY-UK for guile-devel@gnu.org; Tue, 28 Sep 2021 05:55:20 -0400 Original-Received: from mail-vs1-xe32.google.com ([2607:f8b0:4864:20::e32]:33576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mV9pW-0006QM-LH for guile-devel@gnu.org; Tue, 28 Sep 2021 05:55:20 -0400 Original-Received: by mail-vs1-xe32.google.com with SMTP id 188so20419834vsv.0 for ; Tue, 28 Sep 2021 02:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=COePivZl7mZahgkbMo6Ji/VFwfEEbv9mb6+vA+J4zwA=; b=Yr9kECoHuRWW8hnKULXEmpD4nqS9IfHf9t3pAn/Q4Vy886pz7uYV4jTlmmA27i1OYI QdQLA0JgcMUsH0FOJc0xtP5GNAF8zMjLoJLbuepa3XNBrH5mWytOYfkxbwm26xflLEMq /sLNT1sFhAswLv8m8ycEcOUjNzXJd6rEjBHtshWjUK/xC3jY2/rpdMaX5wwsxQswU5CL jIdgr+6KihcMg4+ED4yWNzpxMuGOG+CbZsAVCMJmuoFpI9xXllk8Mw/1PGrq/P82DizG kWvGHb+XZwgcOjm321iJWz3RldqB2xjTmkmNXufyika1KzFtd2ih0nVj1RI1riNZoiXK kpCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=COePivZl7mZahgkbMo6Ji/VFwfEEbv9mb6+vA+J4zwA=; b=uWH48A4jHaOA6jlRewcg/FreobjzqyvkHO0vW3TApIj1Qj1q0aZa6UiFNaO1Hb8OG9 jK+NTWdd2QfyY6SiORwOwUKlcMTRmITWepMpxELeW6XSFpUPqcyeAqD0zzqAe5xi4Aw2 D0IT4v5afRDwoqb/tXPfWNW9scZME0bIuF9YUKl2YImlQceq27u9m5syPAaqEcw7D7z+ 3c54MPcYCaOW+02FdihZ2tH+vTRgiJsAN8V5qSybc3DmEiS6xzd0lr4GHsmGGQUdjlnx NrS4xyvR3s+Hl/gjRMqjyxdqMChtHyKjte19CElZW1kMHLzb3ia3HEZFb+LOFjlU15xf t8RQ== X-Gm-Message-State: AOAM530JyDFB4F7/mh+vrFgZVW3wq1eTb1yqZJv6n/PX+u76Ey/La1Qg 5/6GqjNSiQR1ro3W3yzu2Pf/6aBdYukbaBv+MIkcoi5/ X-Google-Smtp-Source: ABdhPJy7UL3KntlPLyiv8zr5rEbZ9SkB2gmp+sDihUdOrMoT5tl8u3AceTuZ0ehjq0s/MMson1nVhdL1g5lFPCb5ysI= X-Received: by 2002:a67:2c58:: with SMTP id s85mr4113520vss.35.1632822917433; Tue, 28 Sep 2021 02:55:17 -0700 (PDT) In-Reply-To: <20210928083156.GE14380@tuxteam.de> Received-SPF: pass client-ip=2607:f8b0:4864:20::e32; envelope-from=stefan.itampe@gmail.com; helo=mail-vs1-xe32.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20891 Archived-At: --000000000000f98d0005cd0b352c Content-Type: text/plain; charset="UTF-8" Then this does not work well (fold min (inf) (list 1 2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 3 4)) which is a pity, we should have an exact inf as well On Tue, Sep 28, 2021 at 10:32 AM wrote: > On Tue, Sep 28, 2021 at 10:15:30AM +0200, Stefan Israelsson Tampe wrote: > > Why is (min (inf) 1) = 1.0 inexact? > > Because inf's result is inexact. The same as (min 3 3.5) is inexact, > too. > > It seems that the `inexactness' is contagious across arithmetic > generics (I haven't found an explicit place in the Guile docs; > the racket docs are more explicit about that). > > Cheers > - t > --000000000000f98d0005cd0b352c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Then this does not work well

(fold min = (inf) (list 1 2000000000000000000000000000000000000000000000000000000000000= 000000000000000000000000000000000000000000000000000000000000000000 3 4))

which is a pity, we should have=C2=A0an exact inf as= well

On Tue, Sep 28, 2021 at 10:32 AM <tomas@tuxteam.de> wrote:
On Tue, Sep 28, 2021 at 10:15:30AM +0200, Stefan I= sraelsson Tampe wrote:
> Why is (min (inf) 1) =3D 1.0=C2=A0 inexact?

Because inf's result is inexact. The same as (min 3 3.5) is inexact, too.

It seems that the `inexactness' is contagious across arithmetic
generics (I haven't found an explicit place in the Guile docs;
the racket docs are more explicit about that).

Cheers
=C2=A0- t
--000000000000f98d0005cd0b352c--