🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.forth
72 messages
72 total messages Page 2 of 2 Started by marcel hendrix Mon, 12 Oct 2026 10:40
Page 2 of 2 • 72 total messages
Re: FCONSTANT specification
#179
Author: Krishna Myneni
Date: Mon, 26 Oct 2026 20:05
47 lines
3707 bytes
On 10/25/26 9:05 AM, Hans Bezemer wrote:
> On 18-10-2026 17:08, Krishna Myneni wrote:
>> On 10/18/26 7:10 AM, Hans Bezemer wrote:
>>> On 17-10-2026 06:37, Krishna Myneni wrote:
>>>  > Yes, you are clearly smarter than the entire IEEE 754 standards
>>>  > committee, which specified that a system should leave the number of
>>>  > digits requested in a binary to decimal conversion to be unbounded.
>>>
>>> Err. Not quite. IEEE 754-2008 permits an implementation-defined limit 
>>> H, provided it meets the standard's minimum requirements. It 
>>> recommends that H be unbounded, but doesn't make an unbounded limit 
>>> mandatory for binary-format conversions.
>>>
>>> Small correction ;-) It's the difference between "shall" and 
>>> "should". In technical specifications, ISO standards, and quality 
>>> management systems, shall and should have distinct, legally binding 
>>> meanings:
>>>
>>
>> Yes, I know what "should" means. There is no claim for legal binding, 
>> and my suggested meanings for "high quality REPRESENT" allow for H to 
>> be set to a fixed value.
> 

> "which specified that a system should leave the number of digits 
> requested in a binary to decimal conversion to be unbounded." Actually 
> -- it didn't, as I've proven beyond a reasonable doubt. That means you 
> were wrong -- and making more than one claim that wasn't supported on 
> any standard.
> 
> I advise you to do your home work properly before publicly stating that 
> a commenter is stupid and ignorant. If you wanna play lazy, be my guest. 
> ...

Perhaps you *should* actually read the IEEE 754 standard before making 
your claim that I misrepresented it. My emphasis below.

"There might be an implementation-defined limit on the number of 
significant digits that can be converted with correct rounding to and 
from supported binary formats. That limit, H, shall be such that H ≥ M + 
3 and *it should be that H is unbounded.*"

--
KM


Re: FCONSTANT specification
#181
Author: Krishna Myneni
Date: Mon, 26 Oct 2026 21:24
26 lines
2649 bytes
On 10/26/26 3:05 PM, Krishna Myneni wrote:
> On 10/25/26 9:05 AM, Hans Bezemer wrote:
>> On 18-10-2026 17:08, Krishna Myneni wrote:
>>> On 10/18/26 7:10 AM, Hans Bezemer wrote:
>>>> On 17-10-2026 06:37, Krishna Myneni wrote:
>>>>  > Yes, you are clearly smarter than the entire IEEE 754 standards
>>>>  > committee, ...

As far as that comment is concerned, yes, it was a bit of sarcasm, in 
response to claims by a poster that everyone else except him was 
operating in some thought bubble concerning binary to decimal floating 
point conversion.

I don't believe I am smarter than the IEEE 754 committee, which is why I 
made the effort to read the standard and try to understand what it says.

For those concerned, I'm not interesting in getting into fights with 
people on the internet, and I will block idiots who are looking for a fight.

--
Krishna Myneni




Re: FCONSTANT specification
#183
Author: Hans Bezemer
Date: Tue, 27 Oct 2026 10:02
25 lines
3015 bytes
On 26-10-2026 22:24, Krishna Myneni wrote:
> As far as that comment is concerned, yes, it was a bit of sarcasm, in 
> response to claims by a poster that everyone else except him was 
> operating in some thought bubble concerning binary to decimal floating 
> point conversion.
I don't think that "insulting" fits my definition of "sarcasm".

> I don't believe I am smarter than the IEEE 754 committee, which is why I 
> made the effort to read the standard and try to understand what it says.
Strange. I've always considered the strength of an argument -- instead 
of committing the eternal sin of the logical fallacy "call to authority".

> For those concerned, I'm not interesting in getting into fights with 
> people on the internet, and I will block idiots who are looking for a 
> fight.
Oh. So I supposed you blocked yourself -- by calling others stupid and 
ignorant. Because -- that sounds like a clear invitation for a prolonged 
verbal disagreement. And I haven't seen an apology yet..

But -- if this should be a covert threat towards me -- see how much I 
care :-) But remember, I can post all kinds of stuff to your posts, and 
you'll never know why people are laughing at you!

Hans Bezemer
Re: FCONSTANT specification
#184
Author: Hans Bezemer
Date: Tue, 27 Oct 2026 10:05
7 lines
1957 bytes
On 26-10-2026 21:05, Krishna Myneni wrote:
> That limit, H, shall be such that H ≥ M + > 3 and *it should be that H is unbounded.*"

You still have no idea what SHOULD means, do you?

Hans Bezemer
Re: FCONSTANT specification
#185
Author: marcel hendrix
Date: Tue, 27 Oct 2026 10:59
9 lines
2109 bytes
On 10/27/2026 11:02 AM, Hans Bezemer wrote:
[..]
> But -- if this should be a covert threat towards me -- see how much I 
> care :-) But remember, I can post all kinds of stuff to your posts, and 
> you'll never know why people are laughing at you!
> 
You're way out of line.

-marcel
Re: FCONSTANT specification
#186
Author: dxf
Date: Wed, 28 Oct 2026 03:40
33 lines
3256 bytes
On 27/10/2026 8:24 am, Krishna Myneni wrote:
> On 10/26/26 3:05 PM, Krishna Myneni wrote:
>> On 10/25/26 9:05 AM, Hans Bezemer wrote:
>>> On 18-10-2026 17:08, Krishna Myneni wrote:
>>>> On 10/18/26 7:10 AM, Hans Bezemer wrote:
>>>>> On 17-10-2026 06:37, Krishna Myneni wrote:
>>>>>  > Yes, you are clearly smarter than the entire IEEE 754 standards
>>>>>  > committee, ...
> 
> As far as that comment is concerned, yes, it was a bit of sarcasm, in response to claims by a poster that everyone else except him was operating in some thought bubble concerning binary to decimal floating point conversion.
> 
> I don't believe I am smarter than the IEEE 754 committee, which is why I made the effort to read the standard and try to understand what it says.
> ...

The standard says different things depending upon which version one reads.

But first a comment on standards and the committees that create them.  Standards
are a convention on practice as decided by people.  Standards don't represent
'truth', 'the science', or necessarily even facts.  Short of legislation, there's
no reason to accept a standard.  Concerning the 'smart' people on committees,
their position is less flexible.  They have exactly two options: go along with
what the rest of the committee contends - or get out.  For a committee member
to vote against consensus, against ratification, is tantamount to resignation.
Committees have no use for members that won't conform.  For this reason I'm
generally more interested in what individuals, critics, have to say about
standards.

Back to IEEE-754.  There seems quite a difference between the 1985 and 2008
versions.  AFAICT the former gives no meaning to mantissa digits greater than
17 in the case of double precision.  It's a problem for those who relied on
'smart' people to think for them because now they're presented with different
standards, different committees, different thinking.
Re: FCONSTANT specification
#187
Author: Krishna Myneni
Date: Wed, 28 Oct 2026 11:45
24 lines
2756 bytes
On 10/27/26 10:40 PM, dxf wrote:
...
>>
>> I don't believe I am smarter than the IEEE 754 committee, which is why I made the effort to read the standard and try to understand what it says.
>> ...
> 
> The standard says different things depending upon which version one reads.
> 
...
> Back to IEEE-754.  There seems quite a difference between the 1985 and 2008
> versions.  AFAICT the former gives no meaning to mantissa digits greater than
> 17 in the case of double precision.  It's a problem for those who relied on
> 'smart' people to think for them because now they're presented with different
> standards, different committees, different thinking.
> 

You are still compliant with the standard if you support 17 digit input 
and output *and* use only round to nearest, despite the updated 
recommendation that the number of decimal digits be unbounded. There is 
backwards compatibility in the standard.

--
KM
Re: FCONSTANT specification
#188
Author: Hans Bezemer
Date: Wed, 28 Oct 2026 18:54
13 lines
2269 bytes
On 27-10-2026 11:59, marcel hendrix wrote:
> On 10/27/2026 11:02 AM, Hans Bezemer wrote:
> [..]
>> But -- if this should be a covert threat towards me -- see how much I 
>> care :-) But remember, I can post all kinds of stuff to your posts, 
>> and you'll never know why people are laughing at you!
>>
> You're way out of line.

I always call out threats. Period. Either do it -- or shut up.

Hans Bezemer
Re: FCONSTANT specification
#190
Author: dxf
Date: Thu, 29 Oct 2026 02:33
25 lines
2714 bytes
On 28/10/2026 10:45 pm, Krishna Myneni wrote:
> On 10/27/26 10:40 PM, dxf wrote:
> ...
>>>
>>> I don't believe I am smarter than the IEEE 754 committee, which is why I made the effort to read the standard and try to understand what it says.
>>> ...
>>
>> The standard says different things depending upon which version one reads.
>>
> ...
>> Back to IEEE-754.  There seems quite a difference between the 1985 and 2008
>> versions.  AFAICT the former gives no meaning to mantissa digits greater than
>> 17 in the case of double precision.  It's a problem for those who relied on
>> 'smart' people to think for them because now they're presented with different
>> standards, different committees, different thinking.
>>
> 
> You are still compliant with the standard if you support 17 digit input and output *and* use only round to nearest, despite the updated recommendation that the number of decimal digits be unbounded. There is backwards compatibility in the standard.

Compliance is the last thing.  Rationale comes first.  I believe the rationale
behind the 1985 requirement (even if not expressly stated) was extracting the last
bit of usable data, cost not considered.  Has IEEE-754 2008 posted a rationale for
their extension?  Because nothing I've seen posted here suggests a benefit - quite
the opposite.
Re: FCONSTANT specification
#192
Author: dxf
Date: Thu, 29 Oct 2026 09:01
35 lines
3313 bytes
On 29/10/2026 1:33 pm, dxf wrote:
> On 28/10/2026 10:45 pm, Krishna Myneni wrote:
>> On 10/27/26 10:40 PM, dxf wrote:
>> ...
>>>>
>>>> I don't believe I am smarter than the IEEE 754 committee, which is why I made the effort to read the standard and try to understand what it says.
>>>> ...
>>>
>>> The standard says different things depending upon which version one reads.
>>>
>> ...
>>> Back to IEEE-754.  There seems quite a difference between the 1985 and 2008
>>> versions.  AFAICT the former gives no meaning to mantissa digits greater than
>>> 17 in the case of double precision.  It's a problem for those who relied on
>>> 'smart' people to think for them because now they're presented with different
>>> standards, different committees, different thinking.
>>>
>>
>> You are still compliant with the standard if you support 17 digit input and output *and* use only round to nearest, despite the updated recommendation that the number of decimal digits be unbounded. There is backwards compatibility in the standard.
> 
> Compliance is the last thing.  Rationale comes first.  I believe the rationale
> behind the 1985 requirement (even if not expressly stated) was extracting the last
> bit of usable data, cost not considered.  Has IEEE-754 2008 posted a rationale for
> their extension?  Because nothing I've seen posted here suggests a benefit - quite
> the opposite.

Reading 5.12.2 again it's not clear to me that the standard is entitling anyone to
print more than 17 significant digits in the case of binary64.  Rather it lets the
implementer specify a limit on number of digits for conversion.  I've used forths
where entering more than 20 digits makes them go haywire.

As previously mentioned it makes no sense that one can output more significant digits
than one can input - in anyone's universe.  Whatever GCC is printing - it's not what
the user entered.
Re: FCONSTANT specification
#193
Author: Anton Ertl
Date: Thu, 29 Oct 2026 09:18
41 lines
2776 bytes
dxf <dxforth@gmail.com> writes:
>Whatever GCC is printing - it's not what
>the user entered.

GCC prints the things you ask it to, usually not FP numbers, but,
e.g., compiler warnings and error messages.

But as for printing what the user entered, here's what Gforth does:

.1000000000000000055511151231257827021181583404541015625e e.exact

outputs

.1000000000000000055511151231257827021181583404541015625e

Admittedly, there are a lot of numbers around that cannot be
represented exactly as binary64 number, and for those the cycle
decimal->binary64->decimal (using >FLOAT and E.EXACT based on a recent
glibc release) does not print what is input, but the rounding happens
at decimal->binary64 stage, not on the output.

Does it look any better for, e.g., E. or 17 e.p?  Consider

.90000000000000007e

E. prints

.9e

17 E.P prints

.90000000000000002e

Note that none of these numbers has more than 17 decimal digits.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: https://forth-standard.org/
EuroForth 2026 CFP: http://www.euroforth.org/ef26/cfp.html
Re: FCONSTANT specification
#194
Author: marcel hendrix
Date: Thu, 29 Oct 2026 11:08
24 lines
2772 bytes
On 10/29/2026 10:01 AM, dxf wrote:
> As previously mentioned it makes no sense that one can output more significant digits
> than one can input - in anyone's universe. 

No doubt about that.

> Whatever GCC is printing - it's not what
> the user entered.

I do that sometimes when I don't know what the hardware/software details 
of the machine/language are, but do know what I want it to approximate 
as best as possible, if not exactly.

That does not mean that I wouldn't be surprised if .90000000000000007e 
e. comes back as 9.0000000000000007000e-1 but .90000000000000000076e e. 
shows 9.0000000000000000098e-1. ( Unless I now the hardware and software 
details of the machine. )

However, shouldn't we then also do something about
1000000000000000000 7 / . 142857142857142857  vs
1000000000000000000000 7 / . 553688574240601819 ?

-marcel
Re: FCONSTANT specification
#195
Author: Anton Ertl
Date: Thu, 29 Oct 2026 16:06
17 lines
2139 bytes
marcel hendrix <mhx@iae.nl> writes:
>However, shouldn't we then also do something about
>1000000000000000000 7 / . 142857142857142857  vs
>1000000000000000000000 7 / . 553688574240601819 ?

Or, more obviously:

1000000000000000000000 . 3875820019684212736  ok

Interestingly, I have hardly seen any complaints about that.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: https://forth-standard.org/
EuroForth 2026 CFP: http://www.euroforth.org/ef26/cfp.html
Re: FCONSTANT specification
#196
Author: marcel hendrix
Date: Thu, 29 Oct 2026 16:46
7 lines
1916 bytes
On 10/29/2026 5:06 PM, Anton Ertl wrote:
> 1000000000000000000000 7 / .

Or this one on, e.g., VFX Forth 64 :-)
1000000000000 7 / . 555555555555  ok

-marcel
Re: FCONSTANT specification
#197
Author: Anton Ertl
Date: Thu, 29 Oct 2026 17:14
18 lines
2099 bytes
marcel hendrix <mhx@iae.nl> writes:
>Or this one on, e.g., VFX Forth 64 :-)
>1000000000000 7 / . 555555555555  ok

Hmm?

[~:173093] vfx64
VFX Forth 64 5.43 [build 0199] 2023-11-09 for Linux x64
© MicroProcessor Engineering Ltd, 1998-2023 

1000000000000 7 / . 142857142857  ok

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: https://forth-standard.org/
EuroForth 2026 CFP: http://www.euroforth.org/ef26/cfp.html
Re: FCONSTANT specification
#198
Author: marcel hendrix
Date: Thu, 29 Oct 2026 21:52
18 lines
2154 bytes
On 10/29/2026 6:14 PM, Anton Ertl wrote:
> marcel hendrix <mhx@iae.nl> writes:
>> Or this one on, e.g., VFX Forth 64 :-)
>> 1000000000000 7 / . 555555555555  ok
> 
> Hmm?
> 
> [~:173093] vfx64
> VFX Forth 64 5.43 [build 0199] 2023-11-09 for Linux x64
> © MicroProcessor Engineering Ltd, 1998-2023
> 
> 1000000000000 7 / . 142857142857  ok
> 
> - anton

When BASE is 36 ?

-marcel
Re: FCONSTANT specification
#199
Author: dxf
Date: Fri, 30 Oct 2026 00:11
54 lines
3008 bytes
On 29/10/2026 8:18 pm, Anton Ertl wrote:
> dxf <dxforth@gmail.com> writes:
>> Whatever GCC is printing - it's not what
>> the user entered.
> 
> GCC prints the things you ask it to, usually not FP numbers, but,
> e.g., compiler warnings and error messages.
> 
> But as for printing what the user entered, here's what Gforth does:
> 
> .1000000000000000055511151231257827021181583404541015625e e.exact
> 
> outputs
> 
> .1000000000000000055511151231257827021181583404541015625e

3.14159265358979323846264338327
3.14159265358979311599796346854

0.66666666666666666666666666666
0.666666666666666629659232512495

What the user expects/wanted to see?

> Admittedly, there are a lot of numbers around that cannot be
> represented exactly as binary64 number, and for those the cycle
> decimal->binary64->decimal (using >FLOAT and E.EXACT based on a recent
> glibc release) does not print what is input, but the rounding happens
> at decimal->binary64 stage, not on the output.
> 
> Does it look any better for, e.g., E. or 17 e.p?  Consider
> 
> .90000000000000007e
> 
> E. prints
> 
> .9e
> 
> 17 E.P prints
> 
> .90000000000000002e
> 
> Note that none of these numbers has more than 17 decimal digits.

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"
Re: FCONSTANT specification
#200
Author: Anton Ertl
Date: Fri, 30 Oct 2026 06:47
28 lines
2878 bytes
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.

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
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: https://forth-standard.org/
EuroForth 2026 CFP: http://www.euroforth.org/ef26/cfp.html
Re: FCONSTANT specification
#203
Author: dxf
Date: Sat, 31 Oct 2026 02:30
23 lines
2688 bytes
On 29/10/2026 10:08 pm, marcel hendrix wrote:
> On 10/29/2026 10:01 AM, dxf wrote:
>> As previously mentioned it makes no sense that one can output more significant digits
>> than one can input - in anyone's universe. 
> 
> No doubt about that.
> 
>> Whatever GCC is printing - it's not what
>> the user entered.
> 
> I do that sometimes when I don't know what the hardware/software details of the machine/language are, but do know what I want it to approximate as best as possible, if not exactly.
> 
> That does not mean that I wouldn't be surprised if .90000000000000007e e. comes back as 9.0000000000000007000e-1 but .90000000000000000076e e. shows 9.0000000000000000098e-1. ( Unless I now the hardware and software details of the machine. )
> 
> However, shouldn't we then also do something about
> 1000000000000000000 7 / . 142857142857142857  vs
> 1000000000000000000000 7 / . 553688574240601819 ?

I doubt programmers are surprised by arithmetic overflow.  Occasionally I've
run into entered literals being too large and not noticing.  Whether the
compiler detects it appears to depend upon on the language and its conventions.
When I looked, C compilers (like Forth) didn't but Pascal did.
Re: FCONSTANT specification
#204
Author: 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
Re: FCONSTANT specification
#205
Author: Anton Ertl
Date: Sat, 31 Oct 2026 07:30
53 lines
3755 bytes
dxf <dxforth@gmail.com> writes:
>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.
...
>The example I gave - 2/3 to infinity
>'correctly rounded' - starts failing at the 17th digit when stored in binary64.

The value 2/3 cannot be represented with finitely many decimal digits,
nor with finitely many binary digits, and certainly not in binary64.

So when you do, say

2e 3e f/ e.exact

on Gforth (with, e.g., glibc 2.36), what happens is:

2e      is converted to binary64, which can be done exactly, so no
        rounding is necessary.
        
3e      likewise.
        
f/      produces a result that cannot be represented exactly in
        binary64, so rounding is necessary, and happens.  If you want
        to call anything "junk" because of lack of exactness, it should
        be the result of F/.

e.exact prints the number it finds on the stack, exactly.

Given that we know how 2/3 should look in decimal, the output of
E.EXACT is useful for seeing how the result of F/ differs from the
exact value.  If you have no use for such information, use a different
FP printing word, e.g., E.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: https://forth-standard.org/
EuroForth 2026 CFP: http://www.euroforth.org/ef26/cfp.html
Page 2 of 2 • 72 total messages
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads