Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Never make any mistaeks." (Anonymous, in a mail discussion about to a kernel bug report.)


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

SubjectAuthor
o Re: contradiction about the INFINITY macroJames Kuyper

1
Re: contradiction about the INFINITY macro

<sk1p83$5e3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: rocksolid2!news.neodome.net!news.mixmin.net!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: Mon, 11 Oct 2021 12:37:23 -0400
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <sk1p83$5e3$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>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 11 Oct 2021 16:37:23 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="a7992d9703e22c1e39fde38bf0a2b887";
logging-data="5571"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18mSBLfQ8yCW9jPMwu7eGQWn1rcdgUTnZM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Cancel-Lock: sha1:aU31olT7uyeDsMMqZ6FLf5KpiFk=
In-Reply-To: <20211009201151$a68b@zira.vinc17.org>
Content-Language: en-US
 by: James Kuyper - Mon, 11 Oct 2021 16:37 UTC

On 10/9/21 4:17 PM, Vincent Lefevre wrote:
> In article <86wnmoov7c.fsf@linuxsc.com>,
> Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>
>> What occurs is defined behavior and (for implementations that do
>> not have the needed value for infinity) violates a constraint.
>> A diagnostic must be produced.
>
> 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.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor