🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.forth
Article #204

Re: FCONSTANT specification

#204
From: dxf
Date: Sat, 31 Oct 2026 04:20
32 lines
2914 bytes
On 30/10/2026 5:47 pm, Anton Ertl wrote:
> dxf <dxforth@gmail.com> writes:
>> It's not clear to me that IEEE even talks in terms of 'representable' numbers
>> which leads to the junk that GCC et al print out:
>>
>> 5.1 Overview
>>
>> "Each of the computational operations that return a numeric result specified by
>>  this standard shall be performed as if it first produced an intermediate result
>>  correct to infinite precision and with unbounded range, and then rounded that
>>  intermediate result, if necessary, to fit in the destination’s format"
> 
> This already says it: "if necessary".  When the result is
> representable in the destination's format, rounding is not necessary.
> When the destination format is a string buffer with enough digits,
> rounding is not necessary, and the exact value can be shown.

1/1, 2/1 can be represented in one digit without rounding.  So what?  It's
everything that can't that is the issue.  The example I gave - 2/3 to infinity
'correctly rounded' - starts failing at the 17th digit when stored in binary64.
If folks printing junk digits are claiming IEEE 2008 entitles them, they need
to show it beyond reasonable doubt.  I'm not saying yes or no.  I'm curious -
just not enough investigate myself as it won't be changing my practice.

> OTOH, almost all (as in "all but finitely many") numbers do not fit in
> binary64, so for almost all numbers that you might convert from a
> decimal string to a binary64 FP number, rounding happens on the
> conversion.  The exceptions are notable, though, e.g., all integers
> <=2^53.
> 
> - anton
Technical Details
Message-ID: <6ae56c9a$1@news.ausics.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.ausics.net!not-for-mail
References: <11aide4$1ibse$1@dont-email.me> <2026Oct16.071212@mips.complang.tuwien.ac.at> <6ad2df65$1@news.ausics.net> <11auu2d$3t6hf$2@dont-email.me> <11b2cv4$142ig$1@dont-email.me> <11b2nct$17v9i$1@dont-email.me> <11bl2ar$3lj23$1@dont-email.me> <11bobpu$trdt$1@dont-email.me> <11bogem$vnlk$1@dont-email.me> <6ae16eae$1@news.ausics.net> <11bsn80$2cg90$1@dont-email.me> <6ae2b06f$1@news.ausics.net> <6ae30b4f$1@news.ausics.net> <2026Oct29.101853@mips.complang.tuwien.ac.at> <6ae3e0af$1@news.ausics.net> <2026Oct30.074708@mips.complang.tuwien.ac.at>

Show Full Headers
Complete Article Headers
Date: Sat, 31 Oct 2026 15:20:42 +1100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: FCONSTANT specification
Newsgroups: comp.lang.forth
References: <11aide4$1ibse$1@dont-email.me>
 <2026Oct16.071212@mips.complang.tuwien.ac.at> <6ad2df65$1@news.ausics.net>
 <11auu2d$3t6hf$2@dont-email.me> <11b2cv4$142ig$1@dont-email.me>
 <11b2nct$17v9i$1@dont-email.me> <11bl2ar$3lj23$1@dont-email.me>
 <11bobpu$trdt$1@dont-email.me> <11bogem$vnlk$1@dont-email.me>
 <6ae16eae$1@news.ausics.net> <11bsn80$2cg90$1@dont-email.me>
 <6ae2b06f$1@news.ausics.net> <6ae30b4f$1@news.ausics.net>
 <2026Oct29.101853@mips.complang.tuwien.ac.at> <6ae3e0af$1@news.ausics.net>
 <2026Oct30.074708@mips.complang.tuwien.ac.at>
Content-Language: en-GB
From: dxf <dxforth@gmail.com>
In-Reply-To: <2026Oct30.074708@mips.complang.tuwien.ac.at>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: news.ausics.net
Message-ID: <6ae56c9a$1@news.ausics.net>
Organization: Ausics - https://newsgroups.ausics.net
Lines: 32
X-Complaints: abuse@ausics.net
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.ausics.net!not-for-mail