From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: (inf) min max Date: Tue, 28 Sep 2021 14:00:44 +0200 Message-ID: References: <20210928083156.GE14380@tuxteam.de> Reply-To: mikael@djurfeldt.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000046526f05cd0cf7d8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25460"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-devel To: Stefan Israelsson Tampe Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Sep 28 14:01:46 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 1mVBnu-0006Pf-9W for guile-devel@m.gmane-mx.org; Tue, 28 Sep 2021 14:01:46 +0200 Original-Received: from localhost ([::1]:38676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVBns-0000S8-Dv for guile-devel@m.gmane-mx.org; Tue, 28 Sep 2021 08:01:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVBnE-0000Q7-9l for guile-devel@gnu.org; Tue, 28 Sep 2021 08:01:04 -0400 Original-Received: from mail-vs1-f43.google.com ([209.85.217.43]:37847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVBn7-0003Qm-6Y for guile-devel@gnu.org; Tue, 28 Sep 2021 08:01:02 -0400 Original-Received: by mail-vs1-f43.google.com with SMTP id q66so21780240vsa.4 for ; Tue, 28 Sep 2021 05:00:56 -0700 (PDT) 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:reply-to :from:date:message-id:subject:to:cc; bh=RsMnf7MKx4+ZNnZIzL+RVzYzrp356vDsQ7CzoZ9Qj9I=; b=aNU6e2+TPCAv95cLX5oeHC1hFNcR/c04JbynbxBkAifTKLTWJivjDu4nE/OYHwU+N+ 7+SsmBcLMhPaa+JC7/SwZqmQmui97CSgIHpODVfplhUdmEw8I3/NPpx9guV39zUjKgZ1 +f059kpXhXsgmPpqcZeaujOfjHi00cDLZLJRIZcBw6TF4NpeQODKBmPSfgretikGnI+L t94Ok1Cp6NFjc8E36J/8hY5WCfWQKwwEHM3ZAC1ORCnjeJuvIOad+68stb0g2wELPNZT b92Epbol67EQUHoKLK1BVj0wCWAShtwj0/fTrdr7ma7jaC+mv+x/Aabhtafjxu7PYrKE mboA== X-Gm-Message-State: AOAM530FW7KXsBqATn4UgaZu/Sj2Gbl/yJICdmCfKKU7PJnzokWxZKRz eTay16qJS+CDBW8He+6Ybb4R1MXTuHQqpQXYfmY= X-Google-Smtp-Source: ABdhPJzQt1xErqTgh9+cWNRgJY9Qw8BTG290BNBZPMb9PT81Hh6D8ks5WhOzbery3xgMUnnuoXflrRNjEf0GCaD79c8= X-Received: by 2002:a67:ef96:: with SMTP id r22mr2135135vsp.17.1632830455434; Tue, 28 Sep 2021 05:00:55 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=209.85.217.43; envelope-from=mdjurfeldt@gmail.com; helo=mail-vs1-f43.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:20893 Archived-At: --00000000000046526f05cd0cf7d8 Content-Type: text/plain; charset="UTF-8" The proper way to handle this would, as you suggest, be to distinguish different kinds on infinities. Then, perhaps, countable infinity could be regarded as scheme:ish exact while infinities of higher cardinality would not (since scheme's handling of that kind of numbers is an approximation and, thus, not exact). Den tis 28 sep. 2021 11:56Stefan Israelsson Tampe skrev: > 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 >> > --00000000000046526f05cd0cf7d8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The proper way to handle this would, as you suggest,= be to distinguish different kinds on infinities. Then, perhaps, countable = infinity could be regarded as scheme:ish exact while infinities of higher c= ardinality would not (since scheme's handling of that kind of numbers i= s an approximation and, thus, not exact).

Den tis 28 sep. 2021 11:56Stefan Isr= aelsson Tampe <stefan.itampe@= gmail.com> skrev:
Then this does not work well

(fold min (inf) (l= ist 1 200000000000000000000000000000000000000000000000000000000000000000000= 0000000000000000000000000000000000000000000000000000000000 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 Israelsson 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
--00000000000046526f05cd0cf7d8--