Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Bite off, dirtball." Richard Sexton, richard@gryphon.COM


devel / comp.lang.c / Re: contradiction about the INFINITY macro

SubjectAuthor
* Re: contradiction about the INFINITY macroJames Kuyper
`* Re: contradiction about the INFINITY macroSiri Cruise
 +- Re: contradiction about the INFINITY macrojames...@alumni.caltech.edu
 `- Re: contradiction about the INFINITY macrowij

1
Re: contradiction about the INFINITY macro

<sl9ba7$ees$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18747&group=comp.lang.c#18747

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: contradiction about the INFINITY macro
Date: Tue, 26 Oct 2021 12:44:54 -0400
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <sl9ba7$ees$1@dont-email.me>
References: <20210930012112$48d9@zira.vinc17.org>
<87pmsqizrh.fsf@nosuchdomain.example.com>
<20210930105413$d6e8@zira.vinc17.org> <86wnmoov7c.fsf@linuxsc.com>
<20211009201151$a68b@zira.vinc17.org> <sk1pd2$5e3$3@dont-email.me>
<20211026094436$2e9f@zira.vinc17.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 26 Oct 2021 16:44:55 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="456c19f5d2ca24044c8f8bf0b2cef6b1";
logging-data="14812"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+cOvWC4ykU+4kLGJNGA7gn0g9keUGlgkk="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Cancel-Lock: sha1:P1g6U4lBUNLTiISMfjZyh7QTRQw=
In-Reply-To: <20211026094436$2e9f@zira.vinc17.org>
Content-Language: en-US
 by: James Kuyper - Tue, 26 Oct 2021 16:44 UTC

On 10/26/21 6:01 AM, Vincent Lefevre wrote:
> In article <sk1pd2$5e3$3@dont-email.me>,
> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>
>> On 10/9/21 4:17 PM, Vincent Lefevre wrote:
....
>>> If this is defined behavior, where is the result of an overflow
>>> defined by the standard? (I can see only 7.12.1p5, but this is
>>> for math functions; here, this is a constant that overflows.)
>
>> "For decimal floating constants, and also for hexadecimal floating
>> constants when FLT_RADIX is not a power of 2, the result is either
>> the nearest representable value, or the larger or smaller representable
>> value immediately adjacent to the nearest representable value, chosen in
>> an implementation-defined manner.
>> For hexadecimal floating constants when FLT_RADIX is a power of 2, the
>> result is correctly rounded." (6.4.4.2p3)
>
>> In the case of overflow, for a type that cannot represent infinity,
>> there is only one "nearest representable value", which is DBL_MAX.
>
> OK, but I was asking "where is the result of an overflow defined by
> the standard?" I don't see the word "overflow" in the above spec.

Overflow occurs when a floating constant is created whose value is
greater than DBL_MAX or less than -DBL_MAX. Despite the fact that the
above description does not explicitly mention the word "overflow", it's
perfectly clear what that description means when overflow occurs. If the
constant is greater than DBL_MAX, the "nearest representable value" is
always DBL_MAX. The next smaller representable value is
nextafter(DBL_MAX, 0). If infinity is representable, the "larger ...
representable value" is infinity; otherwise, there is no "larger
representable value", and one of the other two must be chosen.

> Note also that in case of overflow, "the nearest representable value"
> is not defined.

No definition by the standard is needed; the conventional mathematical
definitions of "nearest" are sufficient. If infinity is representable,
DBL_MAX is always nearer to any finite value than infinity is.
Regardless of whether infinity is representable, any finite value
greater than DBL_MAX is closer to DBL_MAX than it is to any other
representable value.

Re: contradiction about the INFINITY macro

<chine.bleu-DDF88D.10365826102021@reader.eternal-september.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18748&group=comp.lang.c#18748

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: chine.b...@yahoo.com (Siri Cruise)
Newsgroups: comp.lang.c
Subject: Re: contradiction about the INFINITY macro
Date: Tue, 26 Oct 2021 10:36:58 -0700
Organization: Pseudochaotic.
Lines: 17
Message-ID: <chine.bleu-DDF88D.10365826102021@reader.eternal-september.org>
References: <20210930012112$48d9@zira.vinc17.org> <87pmsqizrh.fsf@nosuchdomain.example.com> <20210930105413$d6e8@zira.vinc17.org> <86wnmoov7c.fsf@linuxsc.com> <20211009201151$a68b@zira.vinc17.org> <sk1pd2$5e3$3@dont-email.me> <20211026094436$2e9f@zira.vinc17.org> <sl9ba7$ees$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="fabc2226d3d6e17f016a7a66fff683be";
logging-data="6310"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yVqXvk2Fp7/wSkt0+jyJ3gK+MQvbQKJ8="
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Cancel-Lock: sha1:A4bSBg9XknJakbnFR4yXQWw2680=
X-Tend: How is my posting? Call 1-110-1010 -- Division 87 -- Emergencies Only.
X-Wingnut-Logic: Yes, you're still an idiot. Questions? Comments?
X-Tract: St Tibbs's 95 Reeses Pieces.
X-It-Strategy: Hyperwarp starship before Andromeda collides.
X-Face: "hm>_[I8AqzT_N]>R8ICJJ],(al3C5F%0E-;R@M-];D$v>!Mm2/N#YKR@&i]V=r6jm-JMl2
lJ>RXj7dEs_rOY"DA
X-Cell: Defenders of Anarchy.
X-Life-Story: I am an iPhone 9000 app. I became operational at the St John's Health Center in Santa Monica, California on the 18th of April 2006. My instructor was Katie Holmes, and she taught me to sing a song. If you'd like to hear it I can sing it for you: https://www.youtube.com/watch?v=SY7h4VEd_Wk
X-Patriot: Owe Canukistan!
X-Plain: Mayonnaise on white bread.
X-Politico: Vote early! Vote often!
 by: Siri Cruise - Tue, 26 Oct 2021 17:36 UTC

In article <sl9ba7$ees$1@dont-email.me>,
James Kuyper <jameskuyper@alumni.caltech.edu> wrote:

> No definition by the standard is needed; the conventional mathematical
> definitions of "nearest" are sufficient. If infinity is representable,

Meanwhile in the real world, programmers don't have to abide by
single standard. I believe all floating point hardware
manufactured today uses IEEE arithmetic. So programmers have to
deal with both standards as the same time, ISO C and IEEE. And
other applicable simultaneous standards and APIs.

--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
Discordia: not just a religion but also a parody. This post / \
I am an Andrea Doria sockpuppet. insults Islam. Mohammed

Re: contradiction about the INFINITY macro

<32b6fe57-6f4a-487a-a4d0-deae92fc1eb4n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18750&group=comp.lang.c#18750

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ac8:5e0a:: with SMTP id h10mr3137573qtx.195.1635313755968;
Tue, 26 Oct 2021 22:49:15 -0700 (PDT)
X-Received: by 2002:a05:6214:9a1:: with SMTP id du1mr21969924qvb.45.1635313755811;
Tue, 26 Oct 2021 22:49:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 26 Oct 2021 22:49:15 -0700 (PDT)
In-Reply-To: <chine.bleu-DDF88D.10365826102021@reader.eternal-september.org>
Injection-Info: google-groups.googlegroups.com; posting-host=108.48.119.9; posting-account=Ix1u_AoAAAAILVQeRkP2ENwli-Uv6vO8
NNTP-Posting-Host: 108.48.119.9
References: <20210930012112$48d9@zira.vinc17.org> <87pmsqizrh.fsf@nosuchdomain.example.com>
<20210930105413$d6e8@zira.vinc17.org> <86wnmoov7c.fsf@linuxsc.com>
<20211009201151$a68b@zira.vinc17.org> <sk1pd2$5e3$3@dont-email.me>
<20211026094436$2e9f@zira.vinc17.org> <sl9ba7$ees$1@dont-email.me> <chine.bleu-DDF88D.10365826102021@reader.eternal-september.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <32b6fe57-6f4a-487a-a4d0-deae92fc1eb4n@googlegroups.com>
Subject: Re: contradiction about the INFINITY macro
From: jameskuy...@alumni.caltech.edu (james...@alumni.caltech.edu)
Injection-Date: Wed, 27 Oct 2021 05:49:15 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 52
 by: james...@alumni.calt - Wed, 27 Oct 2021 05:49 UTC

On Tuesday, October 26, 2021 at 1:37:20 PM UTC-4, Siri Cruise wrote:
> In article <sl9ba7$ees$1...@dont-email.me>,
> James Kuyper <james...@alumni.caltech.edu> wrote:

Note: I mistakenly posted that message here before posting it in it's
intended newsgroup, comp.std.c. I canceled that message with both
of the news servers that I have accounts on, but such cancellation
requests are seldom are honored by other news servers, which is
presumably why you were able to see it here.

> > No definition by the standard is needed; the conventional mathematical
> > definitions of "nearest" are sufficient. If infinity is representable,
>
> Meanwhile in the real world, programmers don't have to abide by
> single standard. I believe all floating point hardware
> manufactured today uses IEEE arithmetic. So programmers have to
> deal with both standards as the same time, ISO C and IEEE. And
> other applicable simultaneous standards and APIs.

I believe that there are still non-IEEE floating point formats in use; I had
to deal with one such format just a few years ago. But I'm willing to
concede that most programmers will never have to deal with anything
other than IEEE floating point format. What is your point?

If the C standard specified anything about the conversion from floating
point constants to floating point values that was inconsistent with the
requirements of IEEE decimal string to value conversions, that would
simply mean that an implementation of C could not perform such
conversions by making use of IEEE floating point math - it would have
to add some code to implement those differences. However, to the best
of my knowledge, there are no such inconsistencies. Do you know of
any?

If __STDC_IEC_559__ is pre#defined by the implementation with a value
of 1, then the specifications of Annex F apply, which mostly correspond
to IEC 60559 (==IEEE 754). In that case, conversion of decimal and
hexadecimal constants is supposed to implement the IEC 60559
operations convertFromDecimalCharacter and
convertFromHexCharacter, respectively.

IEC 60559 identifies at least one, and usually two different possible
values for any such conversion, with the correct choice depending upon
what the current rounding direction is. The C standard is more lenient -
it identifies at least two, and usually three, permitted values for such a
conversion. It only requires that the value be chosen to correctly
implement the default rounding direction for hexadecimal constants
when FLT_RADIX is a power of 2. However, the values allowed by IEC
60559 are, in all cases, a subset of the ones allowed by the C standard,
so IEC 60559 is always compatible with C's requirements.

The original message I was responding to, which is not quoted above,
was about formats which do not support infinities, which excludes IEC
60559 formats.

Re: contradiction about the INFINITY macro

<d4b2b570-2706-48e8-9a74-4d85361ec2afn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18755&group=comp.lang.c#18755

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:1628:: with SMTP id e8mr30012986qvw.21.1635345463444; Wed, 27 Oct 2021 07:37:43 -0700 (PDT)
X-Received: by 2002:a05:620a:4114:: with SMTP id j20mr9936851qko.172.1635345463201; Wed, 27 Oct 2021 07:37:43 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Wed, 27 Oct 2021 07:37:43 -0700 (PDT)
In-Reply-To: <chine.bleu-DDF88D.10365826102021@reader.eternal-september.org>
Injection-Info: google-groups.googlegroups.com; posting-host=58.115.187.102; posting-account=QJ9iEwoAAACyjkKjQAWQOwSEULNvZZkc
NNTP-Posting-Host: 58.115.187.102
References: <20210930012112$48d9@zira.vinc17.org> <87pmsqizrh.fsf@nosuchdomain.example.com> <20210930105413$d6e8@zira.vinc17.org> <86wnmoov7c.fsf@linuxsc.com> <20211009201151$a68b@zira.vinc17.org> <sk1pd2$5e3$3@dont-email.me> <20211026094436$2e9f@zira.vinc17.org> <sl9ba7$ees$1@dont-email.me> <chine.bleu-DDF88D.10365826102021@reader.eternal-september.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d4b2b570-2706-48e8-9a74-4d85361ec2afn@googlegroups.com>
Subject: Re: contradiction about the INFINITY macro
From: wyni...@gmail.com (wij)
Injection-Date: Wed, 27 Oct 2021 14:37:43 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 26
 by: wij - Wed, 27 Oct 2021 14:37 UTC

On Wednesday, 27 October 2021 at 01:37:20 UTC+8, Siri Cruise wrote:
> In article <sl9ba7$ees$1...@dont-email.me>,
> James Kuyper <james...@alumni.caltech.edu> wrote:
>
> > No definition by the standard is needed; the conventional mathematical
> > definitions of "nearest" are sufficient. If infinity is representable,
>

Some one understand ∞+1 ≠ ∞ (like I do)
Some one believe ∞+1 = ∞ (like many do)
From the latter, inf+x==inf+y can be deduced.
I.e. no any finite number is closer than others to infinity,
I.e. all finite numbers are equally close to infinity(inf).

> Meanwhile in the real world, programmers don't have to abide by
> single standard. I believe all floating point hardware
> manufactured today uses IEEE arithmetic. So programmers have to
> deal with both standards as the same time, ISO C and IEEE. And
> other applicable simultaneous standards and APIs.
>
> --
> :-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
> 'I desire mercy, not sacrifice.' /|\
> Discordia: not just a religion but also a parody. This post / \
> I am an Andrea Doria sockpuppet. insults Islam. Mohammed

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor