Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #135412

Re: Make double numbers notation more strict

From Stephen Pelc <stephen@vfxforth.com>
Newsgroups comp.lang.forth
Subject Re: Make double numbers notation more strict
Date 2026-08-24 16:57 +0000
Organization A noiseless patient Spider
Message-ID <116ht5r$321ca$1@dont-email.me> (permalink)
References <nnd$75f73955$2d227776@b20bb7cf7316e876>

Show all headers | View raw


On 24 Aug 2026 at 12:36:29 GMT+1, "albert@spenarnc.xs4all.nl"
<albert@spenarnc.xs4all.nl> wrote:

> What does the Forth community think of the following:
> 
> Now double numbers have to end with a '.' (c-notation).
> Double precision numbers loose significance in the 64 bit era.
> Time to de-emphasize this.

This topic comes up every decade or so.

My attitude is based on two attitudes towards Forth:
1) Don't bury your tools
2) Notation matters

IMHO the Forth standard notation for both floats and integers is all but
useless for handling number entry from a user of a commercial application. I
state this having helped maintain a Forth application of over 1 million lines
of Forth source code for over 30 years. The standard number for this
application is a 128 bit integer to avoid rounding errors in spreadsheet
recalculation. Yes, double numbers still matter and we have a 128 bit flat
pack for VFX - thak you to David Kuhling.

At least in Europe, there are two main forms of writing large integers
  123,456,789
  123.456.789
If the '.' character is used as an integer digits separator, the ',' character
usually used a decimal point and vice versa.

As a starting point it is trivial to make these characters settable.
  Char . Dp-char c!
  Char , fp-char c!
Now you can add the e1234 notation to extend the floating point notation.

There are extensions that I leave as an exercise for the reader to make the
notation compatible with Forth-2012.

In order to improve the readability of long integers in binary or hex, it is
useful to define a character that is always ignored in number conversion, e.g.
  char : ign-char c!

VFX Forth has worked this way for a very long time (decades) and no technical
support has ensued.
No recognisers were needed, broken, or abused in constructing this notation.

Stephen

-- 
Stephen Pelc, stephen@vfxforth.com
Wodni & Pelc GmbH
Vienna, Austria
Tel: +44 (0)7803 903612, +34 649 662 974
http://www.vfxforth.com/downloads/VfxCommunity/
  free VFX Forth downloads

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Make double numbers notation more strict albert@spenarnc.xs4all.nl - 2026-08-24 13:36 +0200
  Re: Make double numbers notation more strict anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-24 14:44 +0000
  Re: Make double numbers notation more strict Stephen Pelc <stephen@vfxforth.com> - 2026-08-24 16:57 +0000
  Re: Make double numbers notation more strict dxf <dxforth@gmail.com> - 2026-08-25 11:10 +1000
    Re: Make double numbers notation more strict Paul Rubin <no.email@nospam.invalid> - 2026-08-24 18:25 -0700
      Re: Make double numbers notation more strict dxf <dxforth@gmail.com> - 2026-08-25 14:44 +1000
    Re: Make double numbers notation more strict Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-24 20:51 -0500
      Re: Make double numbers notation more strict dxf <dxforth@gmail.com> - 2026-08-25 14:17 +1000
        Re: Make double numbers notation more strict Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-25 05:51 -0500
          Re: Make double numbers notation more strict dxf <dxforth@gmail.com> - 2026-08-25 21:20 +1000
            Re: Make double numbers notation more strict Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-25 10:41 -0500
              Re: Make double numbers notation more strict dxf <dxforth@gmail.com> - 2026-08-26 13:51 +1000
          Re: Make double numbers notation more strict albert@spenarnc.xs4all.nl - 2026-08-26 11:54 +0200
            Re: Make double numbers notation more strict albert@spenarnc.xs4all.nl - 2026-08-26 12:00 +0200
              Re: Make double numbers notation more strict antispam@fricas.org (Waldek Hebisch) - 2026-08-26 14:39 +0000
                Re: Make double numbers notation more strict anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-26 15:28 +0000
                Re: Make double numbers notation more strict peter <peter.noreply@tin.it> - 2026-08-26 18:42 +0200
                Re: Make double numbers notation more strict anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-26 17:04 +0000
                Re: Make double numbers notation more strict albert@spenarnc.xs4all.nl - 2026-08-27 12:43 +0200
        Re: Make double numbers notation more strict Hans Bezemer <the.beez.speaks@gmail.com> - 2026-08-26 09:12 +0200
    Re: Make double numbers notation more strict Hans Bezemer <the.beez.speaks@gmail.com> - 2026-08-26 09:15 +0200
  Re: Make double numbers notation more strict Hans Bezemer <the.beez.speaks@gmail.com> - 2026-08-26 09:09 +0200
    Re: Make double numbers notation more strict albert@spenarnc.xs4all.nl - 2026-08-26 12:22 +0200
      Re: Make double numbers notation more strict Hans Bezemer <the.beez.speaks@gmail.com> - 2026-08-26 19:40 +0200

csiph-web