unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* (inf) min max
@ 2021-09-28  8:15 Stefan Israelsson Tampe
  2021-09-28  8:31 ` tomas
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Israelsson Tampe @ 2021-09-28  8:15 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 37 bytes --]

Why is (min (inf) 1) = 1.0  inexact?

[-- Attachment #2: Type: text/html, Size: 75 bytes --]

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

* Re: (inf) min max
  2021-09-28  8:15 (inf) min max Stefan Israelsson Tampe
@ 2021-09-28  8:31 ` tomas
  2021-09-28  9:55   ` Stefan Israelsson Tampe
  0 siblings, 1 reply; 5+ messages in thread
From: tomas @ 2021-09-28  8:31 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 375 bytes --]

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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: (inf) min max
  2021-09-28  8:31 ` tomas
@ 2021-09-28  9:55   ` Stefan Israelsson Tampe
  2021-09-28 10:33     ` tomas
  2021-09-28 12:00     ` Mikael Djurfeldt
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Israelsson Tampe @ 2021-09-28  9:55 UTC (permalink / raw)
  To: tomas; +Cc: guile-devel

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

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 <tomas@tuxteam.de> 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
>

[-- Attachment #2: Type: text/html, Size: 1080 bytes --]

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

* Re: (inf) min max
  2021-09-28  9:55   ` Stefan Israelsson Tampe
@ 2021-09-28 10:33     ` tomas
  2021-09-28 12:00     ` Mikael Djurfeldt
  1 sibling, 0 replies; 5+ messages in thread
From: tomas @ 2021-09-28 10:33 UTC (permalink / raw)
  To: Stefan Israelsson Tampe; +Cc: guile-devel

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

On Tue, Sep 28, 2021 at 11:55:06AM +0200, Stefan Israelsson Tampe wrote:
> 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

Yeah, the idea of a numerical "tower" breaks down a bit in
the presence of arbitrarily big ints and exact fractions of
those. Suddenly, IEEE 754 aren't (always) at the tower's
"top".

It is as if someone attached a balcony to one of the
tower's sides and put an even taller tower on top of
that :-)

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: (inf) min max
  2021-09-28  9:55   ` Stefan Israelsson Tampe
  2021-09-28 10:33     ` tomas
@ 2021-09-28 12:00     ` Mikael Djurfeldt
  1 sibling, 0 replies; 5+ messages in thread
From: Mikael Djurfeldt @ 2021-09-28 12:00 UTC (permalink / raw)
  To: Stefan Israelsson Tampe; +Cc: guile-devel

[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]

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 <stefan.itampe@gmail.com>
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 <tomas@tuxteam.de> 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
>>
>

[-- Attachment #2: Type: text/html, Size: 1797 bytes --]

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

end of thread, other threads:[~2021-09-28 12:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28  8:15 (inf) min max Stefan Israelsson Tampe
2021-09-28  8:31 ` tomas
2021-09-28  9:55   ` Stefan Israelsson Tampe
2021-09-28 10:33     ` tomas
2021-09-28 12:00     ` Mikael Djurfeldt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).