Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

For every complex problem, there is a solution that is simple, neat, and wrong. -- H. L. Mencken


devel / comp.lang.scheme / R7RS and infinities (was: Some pre-SRFI-ish thoughts on arithmetic)

SubjectAuthor
* Some pre-SRFI-ish thoughts on arithmeticMasanori Ogino
`* Re: Some pre-SRFI-ish thoughts on arithmeticco...@ccil.org
 `* Re: Some pre-SRFI-ish thoughts on arithmeticMasanori Ogino
  `* Re: Some pre-SRFI-ish thoughts on arithmeticMasanori Ogino
   `- R7RS and infinities (was: Some pre-SRFI-ish thoughts on arithmetic)Masanori Ogino

1
Some pre-SRFI-ish thoughts on arithmetic

<188f0b35-1b07-41a1-8149-ca3015ca0c75n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=201&group=comp.lang.scheme#201

  copy link   Newsgroups: comp.lang.scheme
X-Received: by 2002:a0c:fb4d:0:b0:537:6dbf:dcbf with SMTP id b13-20020a0cfb4d000000b005376dbfdcbfmr1566418qvq.96.1675179903064;
Tue, 31 Jan 2023 07:45:03 -0800 (PST)
X-Received: by 2002:a05:6870:15cb:b0:163:babd:12e with SMTP id
k11-20020a05687015cb00b00163babd012emr963116oad.146.1675179902794; Tue, 31
Jan 2023 07:45:02 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.scheme
Date: Tue, 31 Jan 2023 07:45:02 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=153.199.156.207; posting-account=yA5ELwoAAACkm1-6p_VI6_yQ6VA8Yb8i
NNTP-Posting-Host: 153.199.156.207
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <188f0b35-1b07-41a1-8149-ca3015ca0c75n@googlegroups.com>
Subject: Some pre-SRFI-ish thoughts on arithmetic
From: masanoriogino@gmail.com (Masanori Ogino)
Injection-Date: Tue, 31 Jan 2023 15:45:03 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1821
 by: Masanori Ogino - Tue, 31 Jan 2023 15:45 UTC

Hi,

I had come up with some ideas last night. I am not sure if it is suitable for c.l.s., r7rs-work, or somewhere else, though...

- A language binding of ISO/IEC 10967 (Language Independent Arithmetic; LIA). It is basically a clarification on semantics of arithmetic functions.

- Reviving SRFI 73 (Exact Infinities). Not only it is required by LIA if a language provides so-called big integers, but they are sometimes useful as sentinel values and such.

- Configurable precision decimal. It is implementable with what RnRS provides but doing efficiently without low-level support seems not easy.

- Fixed-width decimal, i.e. radix 10 flonums.

Talk to me if you feel that any of the above is in fact worth drafting a document. It is also ok to tell me that they are worthless, though.

Best,
Masanori

Re: Some pre-SRFI-ish thoughts on arithmetic

<ab2e023a-274b-4131-b9e9-8de159eaad34n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=202&group=comp.lang.scheme#202

  copy link   Newsgroups: comp.lang.scheme
X-Received: by 2002:a0c:db89:0:b0:537:6bb8:63d3 with SMTP id m9-20020a0cdb89000000b005376bb863d3mr100700qvk.54.1675235712620;
Tue, 31 Jan 2023 23:15:12 -0800 (PST)
X-Received: by 2002:a05:6870:d1c6:b0:163:9b8b:8227 with SMTP id
b6-20020a056870d1c600b001639b8b8227mr71624oac.163.1675235712271; Tue, 31 Jan
2023 23:15:12 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.scheme
Date: Tue, 31 Jan 2023 23:15:11 -0800 (PST)
In-Reply-To: <188f0b35-1b07-41a1-8149-ca3015ca0c75n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=67.245.31.40; posting-account=TN5epwoAAAADtuyyY55QiUwO7xVz4KnH
NNTP-Posting-Host: 67.245.31.40
References: <188f0b35-1b07-41a1-8149-ca3015ca0c75n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ab2e023a-274b-4131-b9e9-8de159eaad34n@googlegroups.com>
Subject: Re: Some pre-SRFI-ish thoughts on arithmetic
From: cowan@ccil.org (co...@ccil.org)
Injection-Date: Wed, 01 Feb 2023 07:15:12 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2563
 by: co...@ccil.org - Wed, 1 Feb 2023 07:15 UTC

On Tuesday, January 31, 2023 at 10:45:04 AM UTC-5, masano...@gmail.com wrote:

> - A language binding of ISO/IEC 10967 (Language Independent Arithmetic; LIA). It is basically a clarification on semantics of arithmetic functions.

I'll have to read the DISes before I can make a judgment on that.

Also worth looking at is ISO/IEC 11404:2007, General Purpose Datatypes. This is freely available from ISO at <https://standards.iso.org/ittf/PubliclyAvailableStandards/c039479_ISO_IEC_11404_2007(E).zip>.

Also worth looking at is ISO/IEC
> - Reviving SRFI 73 (Exact Infinities). Not only it is required by LIA if a language provides so-called big integers, but they are sometimes useful as sentinel values and such.

I don't think these are very useful: 1/0 is made of exact numbers, but it is not itself an exact number. However, if you are going to have them, you might as well have 0/0, or exact NaN, as well -- I don't really understand why SRFI 73 excludes it.

> - Configurable precision decimal. It is implementable with what RnRS provides but doing efficiently without low-level support seems not easy.
>
> - Fixed-width decimal, i.e. radix 10 flonums.

If it's fixed point, it can't be floating point too. You can squeeze a slightly larger range out of fixed-point decimal (for a given number of bits), but floating decimal has a standard (IEEE 754:2008) that is isomorphic to IEEE 754 binary floats.

Re: Some pre-SRFI-ish thoughts on arithmetic

<b041b34f-8914-43b3-a88c-5a9c4fca7fc1n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=203&group=comp.lang.scheme#203

  copy link   Newsgroups: comp.lang.scheme
X-Received: by 2002:a37:a0b:0:b0:719:1ae9:71a2 with SMTP id 11-20020a370a0b000000b007191ae971a2mr171508qkk.293.1675251904956;
Wed, 01 Feb 2023 03:45:04 -0800 (PST)
X-Received: by 2002:a05:6870:71d:b0:160:31c2:3dc5 with SMTP id
ea29-20020a056870071d00b0016031c23dc5mr137702oab.296.1675251904573; Wed, 01
Feb 2023 03:45:04 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.scheme
Date: Wed, 1 Feb 2023 03:45:04 -0800 (PST)
In-Reply-To: <ab2e023a-274b-4131-b9e9-8de159eaad34n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=153.199.156.207; posting-account=yA5ELwoAAACkm1-6p_VI6_yQ6VA8Yb8i
NNTP-Posting-Host: 153.199.156.207
References: <188f0b35-1b07-41a1-8149-ca3015ca0c75n@googlegroups.com> <ab2e023a-274b-4131-b9e9-8de159eaad34n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b041b34f-8914-43b3-a88c-5a9c4fca7fc1n@googlegroups.com>
Subject: Re: Some pre-SRFI-ish thoughts on arithmetic
From: masanoriogino@gmail.com (Masanori Ogino)
Injection-Date: Wed, 01 Feb 2023 11:45:04 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Masanori Ogino - Wed, 1 Feb 2023 11:45 UTC

Hi Cowan,

Thank you for your comments.

> > - A language binding of ISO/IEC 10967 (Language Independent Arithmetic; LIA). It is basically a clarification on semantics of arithmetic functions.
> I'll have to read the DISes before I can make a judgment on that.

The International Standard ISO/IEC 10967 series are freely available on the website iirc.
> Also worth looking at is ISO/IEC 11404:2007, General Purpose Datatypes. This is freely available from ISO at <https://standards.iso.org/ittf/PubliclyAvailableStandards/c039479_ISO_IEC_11404_2007(E).zip>.

Indeed. I have little interest on ISO/IEC 11404 at this moment, though.

> > - Reviving SRFI 73 (Exact Infinities). Not only it is required by LIA if a language provides so-called big integers, but they are sometimes useful as sentinel values and such.
> I don't think these are very useful: 1/0 is made of exact numbers, but it is not itself an exact number. However, if you are going to have them, you might as well have 0/0, or exact NaN, as well -- I don't really understand why SRFI 73 excludes it.

It was my fault to say reviving SRFI 73, which is misleading.

My intention is introducing a way to represent the upper and lower limits of integer. We can consider such limits without making 1/0 valid. In this context, NaN as a value is unnecessary, because 0/0 is invalid as well.

> > - Configurable precision decimal. It is implementable with what RnRS provides but doing efficiently without low-level support seems not easy.
> >
> > - Fixed-width decimal, i.e. radix 10 flonums.
> If it's fixed point, it can't be floating point too. You can squeeze a slightly larger range out of fixed-point decimal (for a given number of bits), but floating decimal has a standard (IEEE 754:2008) that is isomorphic to IEEE 754 binary floats.

Yes, it is what I meant. Fixed-width decimals ex. 128-bit floating point decimals as defined in IEEE 754-2008 and -2019.

Best,
Masanori

Re: Some pre-SRFI-ish thoughts on arithmetic

<4e6c0ba9-ff48-461a-a6eb-4d3a1db008e5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=204&group=comp.lang.scheme#204

  copy link   Newsgroups: comp.lang.scheme
X-Received: by 2002:a05:620a:891:b0:71d:f1a9:72f3 with SMTP id b17-20020a05620a089100b0071df1a972f3mr433097qka.167.1675315469806;
Wed, 01 Feb 2023 21:24:29 -0800 (PST)
X-Received: by 2002:a05:6870:818e:b0:161:a7f6:af1 with SMTP id
k14-20020a056870818e00b00161a7f60af1mr149553oae.131.1675315469415; Wed, 01
Feb 2023 21:24:29 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.scheme
Date: Wed, 1 Feb 2023 21:24:29 -0800 (PST)
In-Reply-To: <b041b34f-8914-43b3-a88c-5a9c4fca7fc1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=153.199.156.207; posting-account=yA5ELwoAAACkm1-6p_VI6_yQ6VA8Yb8i
NNTP-Posting-Host: 153.199.156.207
References: <188f0b35-1b07-41a1-8149-ca3015ca0c75n@googlegroups.com>
<ab2e023a-274b-4131-b9e9-8de159eaad34n@googlegroups.com> <b041b34f-8914-43b3-a88c-5a9c4fca7fc1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4e6c0ba9-ff48-461a-a6eb-4d3a1db008e5n@googlegroups.com>
Subject: Re: Some pre-SRFI-ish thoughts on arithmetic
From: masanoriogino@gmail.com (Masanori Ogino)
Injection-Date: Thu, 02 Feb 2023 05:24:29 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2369
 by: Masanori Ogino - Thu, 2 Feb 2023 05:24 UTC

Hi again,

> > > - Reviving SRFI 73 (Exact Infinities). Not only it is required by LIA if a language provides so-called big integers, but they are sometimes useful as sentinel values and such.
> > I don't think these are very useful: 1/0 is made of exact numbers, but it is not itself an exact number. However, if you are going to have them, you might as well have 0/0, or exact NaN, as well -- I don't really understand why SRFI 73 excludes it.
> It was my fault to say reviving SRFI 73, which is misleading.
>
> My intention is introducing a way to represent the upper and lower limits of integer. We can consider such limits without making 1/0 valid. In this context, NaN as a value is unnecessary, because 0/0 is invalid as well.

So, in the end, exactness was unrelated.

Making (integer? +inf.0) and (integer? -inf.0) #t seems enough for LIA. Doing so, however, violates R7RS, section 6.2.4.

> Positive infinity is regarded as an inexact real (but not rational) number that ...
> Negative infinity is regarded as an inexact real (but not rational) number that ...

Best,
Masanori

R7RS and infinities (was: Some pre-SRFI-ish thoughts on arithmetic)

<9d532292-83e1-4f0a-8663-342732b378d4n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=208&group=comp.lang.scheme#208

  copy link   Newsgroups: comp.lang.scheme
X-Received: by 2002:a05:622a:19a2:b0:3b8:5f47:aab6 with SMTP id u34-20020a05622a19a200b003b85f47aab6mr59061qtc.235.1675711507600;
Mon, 06 Feb 2023 11:25:07 -0800 (PST)
X-Received: by 2002:a05:6870:f113:b0:16a:4df8:94e5 with SMTP id
k19-20020a056870f11300b0016a4df894e5mr462490oac.201.1675711507339; Mon, 06
Feb 2023 11:25:07 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.scheme
Date: Mon, 6 Feb 2023 11:25:07 -0800 (PST)
In-Reply-To: <4e6c0ba9-ff48-461a-a6eb-4d3a1db008e5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=153.199.156.207; posting-account=yA5ELwoAAACkm1-6p_VI6_yQ6VA8Yb8i
NNTP-Posting-Host: 153.199.156.207
References: <188f0b35-1b07-41a1-8149-ca3015ca0c75n@googlegroups.com>
<ab2e023a-274b-4131-b9e9-8de159eaad34n@googlegroups.com> <b041b34f-8914-43b3-a88c-5a9c4fca7fc1n@googlegroups.com>
<4e6c0ba9-ff48-461a-a6eb-4d3a1db008e5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9d532292-83e1-4f0a-8663-342732b378d4n@googlegroups.com>
Subject: R7RS and infinities (was: Some pre-SRFI-ish thoughts on arithmetic)
From: masanoriogino@gmail.com (Masanori Ogino)
Injection-Date: Mon, 06 Feb 2023 19:25:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2739
 by: Masanori Ogino - Mon, 6 Feb 2023 19:25 UTC

Hi,

> > My intention is introducing a way to represent the upper and lower limits of integer. We can consider such limits without making 1/0 valid. In this context, NaN as a value is unnecessary, because 0/0 is invalid as well.
> So, in the end, exactness was unrelated.
>
> Making (integer? +inf.0) and (integer? -inf.0) #t seems enough for LIA. Doing so, however, violates R7RS, section 6.2.4.
>
> > Positive infinity is regarded as an inexact real (but not rational) number that ...
> > Negative infinity is regarded as an inexact real (but not rational) number that ...
>

Here is the full paragraph:

> Positive infinity is regarded as an inexact real (but not rational) number that represents an indeterminate value greater than the numbers represented by all rational numbers. Negative infinity is regarded as an inexact real (but not rational) number that represents an indeterminate value less than the numbers represented by all rational numbers.

This definitions above intentionally lack relations between real numbers and infinities.

I think we can define infinities differently so that we can specify them as just “special numbers” and make the position in the numerical tower implementation-defined. Any opinions, anyone?

Best,
Masanori

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor