Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <2024Dec26.093349@mips.complang.tuwien.ac.at>
Deutsch   English   Français   Italiano  
<2024Dec26.093349@mips.complang.tuwien.ac.at>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: FP number syntax
Date: Thu, 26 Dec 2024 08:33:49 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 54
Message-ID: <2024Dec26.093349@mips.complang.tuwien.ac.at>
References: <f3d930ef062d020cd12825545af27eb8cccf9160@i2pn2.org> <1813f2d19d4342f6$1$2114101$6edd246a@news.thundernews.com> <a8ce35a637d497e9463b59e0a60610f9193a0964@i2pn2.org> <18144fdcf3101ad4$48173$217357$28dd626e@news.thundernews.com> <e5e1f8524522d6ce46bbbe3461a3ab654b335abc@i2pn2.org> <2024Dec25.123616@mips.complang.tuwien.ac.at> <72a684322eef7cc0ccfc9495cfee48f7@www.novabbs.com> <0d58f9f2c2e7ce33f032cbda245a1eee4782552f@i2pn2.org> <874j2rpcl3.fsf@nightsong.com>
Injection-Date: Thu, 26 Dec 2024 09:54:38 +0100 (CET)
Injection-Info: dont-email.me; posting-host="fe94df56a285672d25a16cc71e6c80f2";
	logging-data="3046381"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+u8uei5pCTsTAg2jkz1b1P"
Cancel-Lock: sha1:y/yPc+A1OwM+wTnISuTsnpEjEak=
X-newsreader: xrn 10.11
Bytes: 3395

Paul Rubin <no.email@nospam.invalid> writes:
>dxf <dxforth@gmail.com> writes:
>> there's been little historical demand '1.34' be recognized as a float.

Depends on how far back in history you go.  I have seen quite a few
puzzled questions by people new to Forth who were confused why
something like

1.23 4.56 f+ f.

does not work as they expect.  This problem is increased by the
requirement in the standard that

123e f.

prints "123." (maybe with trailing zeros) rather than something that,
when copied and pasted as Forth input, reproduces that number.

There is a reason why Gforth produces warnings when you write numbers
in that way (and that includes writing them as "123.").

>It's a mistake I make all the time, but I figure it's one of Forth's
>frozen oddities.

It's a backwards compatibility problem, yes, but I see a way to melt
it, see below.

>In a non-ANS Forth, I'd probably make 1.34 a float and
>use some other scheme for literal doubles.

We have discussed this maybe a decade ago in a Forth200x meeting, and
someone pointed out that we already have that other scheme: For
doubles with decimal base, use

#123.

Similarly for hex and binary base.  Doubles in other bases are
extremely rare (I don't think I ever encountered one).

With that in place, the next step in the melting process would be to
make the "123." syntax obsolescent.  And then, one standard version
later, destandardize this syntax.  Then systems would be free to
interpret "123." as FP number, and I expect that many would switch.  I
am less optimistic about standardizing the "123." syntax as indicating
FP, because I expect that there will be systems that stick with "123."
being interpreted as double-cell integer for backward-compatibility
reasons, or to honour the prophet.

- 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 2024: https://euro.theforth.net