• Make double numbers notation more strict

    From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Mon Aug 24 13:36:29 2026
    From Newsgroup: comp.lang.forth

    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.

    Proposed:
    A double precision integer has to start and end with a '.',
    possible other places are allowed:
    .0000.0000.DEAD.BEEF.1234.1234.1234.1234.
    .12.
    All other notations are obsolescent.

    Of course inexact numbers ("floating point") cannot contain two '.'.
    This clears the way to have numbers like
    12.0 12. .123
    naturally meaning floating point.

    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Mon Aug 24 14:44:39 2026
    From Newsgroup: comp.lang.forth

    albert@spenarnc.xs4all.nl writes:
    Proposed:
    A double precision integer has to start and end with a '.',
    ...
    This clears the way to have numbers like
    12.0 12. .123
    naturally meaning floating point.

    We already have a notation for double numbers that cannot be an FP
    number: prefixed numbers, e.g.:

    #10.
    $10.

    And in development Gforth you already get a warning if you write a
    double number without prefix.

    - 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
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stephen Pelc@stephen@vfxforth.com to comp.lang.forth on Mon Aug 24 16:57:31 2026
    From Newsgroup: comp.lang.forth

    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
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Tue Aug 25 11:10:17 2026
    From Newsgroup: comp.lang.forth

    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and
    still folks are finding uses. Getting rid of doubles/input just to
    support floating-point which isn't even forth's niche (RPN and all that)
    ... seems so wrong.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.forth on Mon Aug 24 18:25:59 2026
    From Newsgroup: comp.lang.forth

    dxf <dxforth@gmail.com> writes:
    floating-point which isn't even forth's niche (RPN and all that)

    Users of a certain age probably learned RPN on HP calculators,
    i.e. floating point.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Krishna Myneni@krishna.myneni@ccreweb.org to comp.lang.forth on Mon Aug 24 20:51:37 2026
    From Newsgroup: comp.lang.forth

    On 8/24/26 8:10 PM, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and
    still folks are finding uses. Getting rid of doubles/input just to
    support floating-point which isn't even forth's niche (RPN and all that)
    ... seems so wrong.


    1) Which Forth systems are getting rid of double length integer input?

    I originally did not implement double length integer input in kForth to
    avoid confusion with floating point. However, with the standardization
    of base prefixes, and with recognizers (though they are not needed for
    this), it became easy to implement an unambiguous form of input for
    double length numbers, requiring a base prefix character and a trailing decimal point e.g.

    #-170141183460469231731687303715884105728.
    $ffffffffffffffffffffffffffffffff.
    %10110001111011000101111.


    2) What is Forth's niche, in your opinion?

    I have used Forth for engineering and scientific tasks for over 40
    years, with nearly all of my journal publications containing results
    obtained with Forth. Julian Noble, Charles Montgomery, and Marcel
    Hendrix also used/use it for the same purposes. The late Prof. Noble
    even wrote a book called Scientific Forth. Many others have widened
    Forth's application space well beyond Chuck Moore's original use.

    --
    Krishna



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Tue Aug 25 14:17:39 2026
    From Newsgroup: comp.lang.forth

    On 25/08/2026 11:51 am, Krishna Myneni wrote:
    On 8/24/26 8:10 PM, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and
    still folks are finding uses.-a Getting rid of doubles/input just to
    support floating-point which isn't even forth's niche (RPN and all that)
    ... seems so wrong.


    1) Which Forth systems are getting rid of double length integer input?

    I originally did not implement double length integer input in kForth to avoid confusion with floating point. However, with the standardization of base prefixes, and with recognizers (though they are not needed for this), it became easy to implement an unambiguous form of input for double length numbers, requiring a base prefix character and a trailing decimal point e.g.

    #-170141183460469231731687303715884105728.
    $ffffffffffffffffffffffffffffffff.
    %10110001111011000101111.

    Interesting because ...

    hex #23E1 decimal f. 230. ok

    works on my system (but apparently not others)


    2) What is Forth's niche, in your opinion?

    I have used Forth for engineering and scientific tasks for over 40 years, with nearly all of my journal publications containing results obtained with Forth. Julian Noble, Charles Montgomery, and Marcel Hendrix also used/use it for the same purposes. The late Prof. Noble even wrote a book called Scientific Forth. Many others have widened Forth's application space well beyond Chuck Moore's original use.

    IIRC Prof Noble wrote FTRAN with the aim of making forth more palatable to scientists/engineers. AFAICS one has to like forth to begin with.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Tue Aug 25 14:44:45 2026
    From Newsgroup: comp.lang.forth

    On 25/08/2026 11:25 am, Paul Rubin wrote:
    dxf <dxforth@gmail.com> writes:
    floating-point which isn't even forth's niche (RPN and all that)

    Users of a certain age probably learned RPN on HP calculators,
    i.e. floating point.

    Standard today is full algebraic. Drives me so crazy that I keep
    reaching for an old $5 calc. No idea how students these days cope.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Krishna Myneni@krishna.myneni@ccreweb.org to comp.lang.forth on Tue Aug 25 05:51:57 2026
    From Newsgroup: comp.lang.forth

    On 8/24/26 11:17 PM, dxf wrote:
    On 25/08/2026 11:51 am, Krishna Myneni wrote:
    On 8/24/26 8:10 PM, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and
    still folks are finding uses.-a Getting rid of doubles/input just to
    support floating-point which isn't even forth's niche (RPN and all that) >>> ... seems so wrong.


    1) Which Forth systems are getting rid of double length integer input?

    I originally did not implement double length integer input in kForth to avoid confusion with floating point. However, with the standardization of base prefixes, and with recognizers (though they are not needed for this), it became easy to implement an unambiguous form of input for double length numbers, requiring a base prefix character and a trailing decimal point e.g.

    #-170141183460469231731687303715884105728.
    $ffffffffffffffffffffffffffffffff.
    %10110001111011000101111.

    Interesting because ...

    hex #23E1 decimal f. 230. ok

    works on my system (but apparently not others)
    ...

    How is your example above relevant to interpreting double length
    integers? What happens when you append a trailing decimal point to
    "#23E1"? Does your system still interpret it as a floating point number?

    --
    KM



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Tue Aug 25 21:20:17 2026
    From Newsgroup: comp.lang.forth

    On 25/08/2026 8:51 pm, Krishna Myneni wrote:
    On 8/24/26 11:17 PM, dxf wrote:
    On 25/08/2026 11:51 am, Krishna Myneni wrote:
    On 8/24/26 8:10 PM, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and
    still folks are finding uses.-a Getting rid of doubles/input just to
    support floating-point which isn't even forth's niche (RPN and all that) >>>> ... seems so wrong.


    1) Which Forth systems are getting rid of double length integer input?

    I originally did not implement double length integer input in kForth to avoid confusion with floating point. However, with the standardization of base prefixes, and with recognizers (though they are not needed for this), it became easy to implement an unambiguous form of input for double length numbers, requiring a base prefix character and a trailing decimal point e.g.

    #-170141183460469231731687303715884105728.
    $ffffffffffffffffffffffffffffffff.
    %10110001111011000101111.

    Interesting because ...

    -a-a hex #23E1 decimal f. 230.-a ok

    works on my system (but apparently not others)
    ...

    How is your example above relevant to interpreting double length integers?

    It's not. Though I did expect it to work on other forths.

    What happens when you append a trailing decimal point to "#23E1"? Does your system still interpret it as a floating point number?

    It's not recognized as any number. # forces decimal interpretation.
    It fails as an integer/double due to 'E'. It then fails as a float
    due to dp after the exponent.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Krishna Myneni@krishna.myneni@ccreweb.org to comp.lang.forth on Tue Aug 25 10:41:46 2026
    From Newsgroup: comp.lang.forth

    On 8/25/26 6:20 AM, dxf wrote:
    On 25/08/2026 8:51 pm, Krishna Myneni wrote:
    On 8/24/26 11:17 PM, dxf wrote:
    On 25/08/2026 11:51 am, Krishna Myneni wrote:
    On 8/24/26 8:10 PM, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and
    still folks are finding uses.-a Getting rid of doubles/input just to >>>>> support floating-point which isn't even forth's niche (RPN and all that) >>>>> ... seems so wrong.


    1) Which Forth systems are getting rid of double length integer input? >>>>
    I originally did not implement double length integer input in kForth to avoid confusion with floating point. However, with the standardization of base prefixes, and with recognizers (though they are not needed for this), it became easy to implement an unambiguous form of input for double length numbers, requiring a base prefix character and a trailing decimal point e.g.

    #-170141183460469231731687303715884105728.
    $ffffffffffffffffffffffffffffffff.
    %10110001111011000101111.

    Interesting because ...

    -a-a hex #23E1 decimal f. 230.-a ok

    works on my system (but apparently not others)
    ...

    How is your example above relevant to interpreting double length integers?

    It's not. Though I did expect it to work on other forths.


    While the Forth 2012 standard does specify base prefix characters for
    the text interpreter when dealing with integers (3.4.1.3), it does not
    do so for text interpretation of floating point numbers:

    12.3.7 Text interpreter input number conversion
    If the Floating-Point word set is present in the dictionary and the
    current base is DECIMAL, the input number-conversion algorithm shall be extended to recognize floating-point numbers in this form:

    Convertible string := <significand><exponent>
    <significand> := [<sign>]<digits>[.<digits0>]
    <exponent> := E[<sign>]<digits0>
    <sign> := { + | - }
    <digits> := <digit><digits0>
    <digits0> := <digit>*
    <digit> := { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }

    ...

    If you want portable source for text input of floating point numbers,
    it's better to not use a base prefix for them.

    What happens when you append a trailing decimal point to "#23E1"? Does your system still interpret it as a floating point number?

    It's not recognized as any number. # forces decimal interpretation.
    It fails as an integer/double due to 'E'. It then fails as a float
    due to dp after the exponent.


    That's good. This is why I adopted the requirement of both the base
    prefix and trailing decimal point for source input of double length
    integers.

    --
    Krishna


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Wed Aug 26 13:51:00 2026
    From Newsgroup: comp.lang.forth

    On 26/08/2026 1:41 am, Krishna Myneni wrote:
    On 8/25/26 6:20 AM, dxf wrote:
    On 25/08/2026 8:51 pm, Krishna Myneni wrote:
    On 8/24/26 11:17 PM, dxf wrote:
    On 25/08/2026 11:51 am, Krishna Myneni wrote:
    On 8/24/26 8:10 PM, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and >>>>>> still folks are finding uses.-a Getting rid of doubles/input just to >>>>>> support floating-point which isn't even forth's niche (RPN and all that) >>>>>> ... seems so wrong.


    1) Which Forth systems are getting rid of double length integer input? >>>>>
    I originally did not implement double length integer input in kForth to avoid confusion with floating point. However, with the standardization of base prefixes, and with recognizers (though they are not needed for this), it became easy to implement an unambiguous form of input for double length numbers, requiring a base prefix character and a trailing decimal point e.g.

    #-170141183460469231731687303715884105728.
    $ffffffffffffffffffffffffffffffff.
    %10110001111011000101111.

    Interesting because ...

    -a-a-a hex #23E1 decimal f. 230.-a ok

    works on my system (but apparently not others)
    ...

    How is your example above relevant to interpreting double length integers? >>
    It's not.-a Though I did expect it to work on other forths.


    While the Forth 2012 standard does specify base prefix characters for the text interpreter when dealing with integers (3.4.1.3), it does not do so for text interpretation of floating point numbers:
    ...

    Yes, I noticed that. I introduced '#' prefix in 2005. I can't say that I looked into what was 'common practice' but my feeling was it should apply
    to all numbers. Recognizer fans might argue otherwise.

    If you want portable source for text input of floating point numbers, it's better to not use a base prefix for them.

    What happens when you append a trailing decimal point to "#23E1"? Does your system still interpret it as a floating point number?

    It's not recognized as any number.-a # forces decimal interpretation.
    It fails as an integer/double due to 'E'.-a It then fails as a float
    due to dp after the exponent.


    That's good. This is why I adopted the requirement of both the base prefix and trailing decimal point for source input of double length integers.

    --
    Krishna



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Wed Aug 26 09:09:21 2026
    From Newsgroup: comp.lang.forth

    On 24-08-2026 13:36, 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.

    Proposed:
    A double precision integer has to start and end with a '.',
    possible other places are allowed:
    .0000.0000.DEAD.BEEF.1234.1234.1234.1234.
    .12.
    All other notations are obsolescent.

    Of course inexact numbers ("floating point") cannot contain two '.'.
    This clears the way to have numbers like
    12.0 12. .123
    naturally meaning floating point.

    Groetjes Albert

    Well, I can be incredibly short about this one: I don't like prefixes.
    Make a parsing word. ;-) D% or D#. Easy, don't need ugly recognizers. My arguments should be common knowledge by now. Even if it is adopted, I
    won't follow.

    Hans Bezemer
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Wed Aug 26 09:12:56 2026
    From Newsgroup: comp.lang.forth

    On 25-08-2026 06:17, dxf wrote:
    On 25/08/2026 11:51 am, Krishna Myneni wrote:
    On 8/24/26 8:10 PM, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and
    still folks are finding uses.-a Getting rid of doubles/input just to
    support floating-point which isn't even forth's niche (RPN and all that) >>> ... seems so wrong.


    1) Which Forth systems are getting rid of double length integer input?

    I originally did not implement double length integer input in kForth to avoid confusion with floating point. However, with the standardization of base prefixes, and with recognizers (though they are not needed for this), it became easy to implement an unambiguous form of input for double length numbers, requiring a base prefix character and a trailing decimal point e.g.

    #-170141183460469231731687303715884105728.
    $ffffffffffffffffffffffffffffffff.
    %10110001111011000101111.

    Interesting because ...

    hex #23E1 decimal f. 230. ok

    works on my system (but apparently not others)


    2) What is Forth's niche, in your opinion?

    I have used Forth for engineering and scientific tasks for over 40 years, with nearly all of my journal publications containing results obtained with Forth. Julian Noble, Charles Montgomery, and Marcel Hendrix also used/use it for the same purposes. The late Prof. Noble even wrote a book called Scientific Forth. Many others have widened Forth's application space well beyond Chuck Moore's original use.

    IIRC Prof Noble wrote FTRAN with the aim of making forth more palatable to scientists/engineers. AFAICS one has to like forth to begin with.


    It's integral part of the 4tH preprocessor: "LET x = 15;" simply works.
    You can select floating point operation, double word operation or single operation by issuing the appropriate word before execution of the "LET".

    Hans Bezemer


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Wed Aug 26 09:15:40 2026
    From Newsgroup: comp.lang.forth

    On 25-08-2026 03:10, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and
    still folks are finding uses. Getting rid of doubles/input just to
    support floating-point which isn't even forth's niche (RPN and all that)
    ... seems so wrong.


    Still it was one of the causes to abandon ALL mixed and double words
    from 4tH. Until I needed them in order to implement high level floating
    point words -- and I consequently had to eat my words ;-)

    Hans Bezemer
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Wed Aug 26 11:54:52 2026
    From Newsgroup: comp.lang.forth

    In article <116js4d$3le16$1@dont-email.me>,
    Krishna Myneni <krishna.myneni@ccreweb.org> wrote:
    On 8/24/26 11:17 PM, dxf wrote:
    On 25/08/2026 11:51 am, Krishna Myneni wrote:
    On 8/24/26 8:10 PM, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and
    still folks are finding uses.-a Getting rid of doubles/input just to
    support floating-point which isn't even forth's niche (RPN and all that) >>>> ... seems so wrong.


    1) Which Forth systems are getting rid of double length integer input?

    I originally did not implement double length integer input in kForth to avoid confusion with floating point. However, with the standardization of base prefixes, and with recognizers (though they are not needed for this), it became easy to implement an unambiguous form of input for double length numbers, requiring a base prefix character and a trailing decimal point e.g.

    #-170141183460469231731687303715884105728.
    $ffffffffffffffffffffffffffffffff.
    %10110001111011000101111.

    Interesting because ...

    hex #23E1 decimal f. 230. ok

    works on my system (but apparently not others)
    ...

    How is your example above relevant to interpreting double length
    integers? What happens when you append a trailing decimal point to
    "#23E1"? Does your system still interpret it as a floating point number?

    My goals was severely restricted. In the absence of prefixes and a
    E fields, make double numbers such that it cannot possible be
    interpreted as an inexact ("floating point") number.


    --
    KM



    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Wed Aug 26 12:00:48 2026
    From Newsgroup: comp.lang.forth

    In article <nnd$6d306c76$0159a1e5@5ebe29de058d18a5>,
    <albert@spenarnc.xs4all.nl> wrote:
    In article <116js4d$3le16$1@dont-email.me>,
    Krishna Myneni <krishna.myneni@ccreweb.org> wrote:
    On 8/24/26 11:17 PM, dxf wrote:
    On 25/08/2026 11:51 am, Krishna Myneni wrote:
    On 8/24/26 8:10 PM, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and
    still folks are finding uses.-a Getting rid of doubles/input just to >>>>> support floating-point which isn't even forth's niche (RPN and all that) >>>>> ... seems so wrong.


    1) Which Forth systems are getting rid of double length integer input? >>>>
    I originally did not implement double length integer input in kForth
    to avoid confusion with floating point. However, with the
    standardization of base prefixes, and with recognizers (though they are
    not needed for this), it became easy to implement an unambiguous form of >input for double length numbers, requiring a base prefix character and a >trailing decimal point e.g.

    #-170141183460469231731687303715884105728.
    $ffffffffffffffffffffffffffffffff.
    %10110001111011000101111.

    Interesting because ...

    hex #23E1 decimal f. 230. ok

    works on my system (but apparently not others)
    ...

    How is your example above relevant to interpreting double length
    integers? What happens when you append a trailing decimal point to
    "#23E1"? Does your system still interpret it as a floating point number?

    My goals was severely restricted. In the absence of prefixes and a
    E fields, make double numbers such that it cannot possible be
    interpreted as an inexact ("floating point") number.

    The next step on this road is to require explicit number prefixes
    for double precision integers and declare the rest obsolescent.
    So each number with a single decimal point or an
    exponent designator lacking a prefix is fp.

    Fine with me.




    --
    KM



    --
    The Chinese government is satisfied with its military superiority over USA. >The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Wed Aug 26 12:22:46 2026
    From Newsgroup: comp.lang.forth

    In article <116m3f1$dtoq$1@dont-email.me>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 24-08-2026 13:36, 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.

    Proposed:
    A double precision integer has to start and end with a '.',
    possible other places are allowed:
    .0000.0000.DEAD.BEEF.1234.1234.1234.1234.
    .12.
    All other notations are obsolescent.

    Of course inexact numbers ("floating point") cannot contain two '.'.
    This clears the way to have numbers like
    12.0 12. .123
    naturally meaning floating point.

    Groetjes Albert

    Well, I can be incredibly short about this one: I don't like prefixes.
    Make a parsing word. ;-) D% or D#. Easy, don't need ugly recognizers. My >arguments should be common knowledge by now. Even if it is adopted, I
    won't follow.

    I agree with you but I did a slight modification with D% and D#
    that leads to a simplification for ordinary numbers alike.
    I don't like the original $ # as seen in iforth. So I added $ # as
    separately loaded parsing works like you D$ D# .
    But now the iforth sources doesn't still compile, you have to
    replace
    $DEADBEEF
    with
    $ DEADBEEF

    Now let "het kwartje val".
    A simple addition to the FIND / FOUND is the following:
    Look up $DEADBEEF. A simple PREFIX flag in $ makes that
    the $ is found as a word.

    WANT $-PREFIX

    S[ ] OK "$DEADBEEF" FOUND

    S[ 156480 ] OK ID.
    $

    The $ found behave as your D$ . It is possibly IMMEDIATE and compiles
    " ' LIT , DEADBEED , " or leaves the stack alone according to STATE.
    (From day one numbers like 123 are STATE aware, no need to change.)
    The parse pointer (>IN or some such) has to advance, not after
    $DEADBEEF but after $.
    That is simple advance the parse pointer with the length of the
    NAME FOUND in every case.
    (Kill the guy with the moustache in starting Forth.)

    This single flag is a far cry from the recognizer proposals.


    Hans Bezemer
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From antispam@antispam@fricas.org (Waldek Hebisch) to comp.lang.forth on Wed Aug 26 14:39:55 2026
    From Newsgroup: comp.lang.forth

    albert@spenarnc.xs4all.nl wrote:
    In article <nnd$6d306c76$0159a1e5@5ebe29de058d18a5>,
    <albert@spenarnc.xs4all.nl> wrote:
    In article <116js4d$3le16$1@dont-email.me>,
    Krishna Myneni <krishna.myneni@ccreweb.org> wrote:
    On 8/24/26 11:17 PM, dxf wrote:
    On 25/08/2026 11:51 am, Krishna Myneni wrote:
    On 8/24/26 8:10 PM, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and >>>>>> still folks are finding uses.|e-a Getting rid of doubles/input just to >>>>>> support floating-point which isn't even forth's niche (RPN and all that) >>>>>> ... seems so wrong.


    1) Which Forth systems are getting rid of double length integer input? >>>>>
    I originally did not implement double length integer input in kForth
    to avoid confusion with floating point. However, with the
    standardization of base prefixes, and with recognizers (though they are
    not needed for this), it became easy to implement an unambiguous form of >>input for double length numbers, requiring a base prefix character and a >>trailing decimal point e.g.

    #-170141183460469231731687303715884105728.
    $ffffffffffffffffffffffffffffffff.
    %10110001111011000101111.

    Interesting because ...

    hex #23E1 decimal f. 230. ok

    works on my system (but apparently not others)
    ...

    How is your example above relevant to interpreting double length >>>integers? What happens when you append a trailing decimal point to >>>"#23E1"? Does your system still interpret it as a floating point number?

    My goals was severely restricted. In the absence of prefixes and a
    E fields, make double numbers such that it cannot possible be
    interpreted as an inexact ("floating point") number.

    The next step on this road is to require explicit number prefixes
    for double precision integers and declare the rest obsolescent.
    So each number with a single decimal point or an
    exponent designator lacking a prefix is fp.

    Fine with me.

    Just a little comment: it is easy to input or output floating point
    numbers in hexadecimal. Advantage compared to decimal is that
    input and output can be exact. So hexadecimal prefix on floating
    point numbers makes sense. But to allow this one either needs
    separate hex float prefix or some other syntactic way to
    distinguish them from double integers.
    --
    Waldek Hebisch
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Wed Aug 26 15:28:19 2026
    From Newsgroup: comp.lang.forth

    antispam@fricas.org (Waldek Hebisch) writes:
    Just a little comment: it is easy to input or output floating point
    numbers in hexadecimal. Advantage compared to decimal is that
    input and output can be exact.

    Decimal input and output can also be exact (for input you have to
    input a number that can be represented exactly as an FP number, but
    that's also the case with hex). The difference is that the hex-base
    FP numbers are much shorter. Never more than 14 hex digits in the
    mantissa of a binary64 number compared to up to 751 decimal digits.
    Also, as long as the exponent is in the range of normal numbers, every
    number of the form

    1.hhhhhhhhhhhhhp<exp>

    can be represented exactly as FP number, while there are lots of even
    very short decimal numbers that cannot be represented exactly as FP
    number.

    But to allow this one either needs
    separate hex float prefix or some other syntactic way to
    distinguish them from double integers.

    C99's %a conversion format for printf uses (in regexp syntax):

    -?0xh.h*[+-]d+

    and I dimly remember that at least one Forth system also uses "p" to
    indicate the exponent of a hex float.

    - 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
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From peter@peter.noreply@tin.it to comp.lang.forth on Wed Aug 26 18:42:13 2026
    From Newsgroup: comp.lang.forth

    On Wed, 26 Aug 2026 15:28:19 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:

    antispam@fricas.org (Waldek Hebisch) writes:
    Just a little comment: it is easy to input or output floating point
    numbers in hexadecimal. Advantage compared to decimal is that
    input and output can be exact.

    Decimal input and output can also be exact (for input you have to
    input a number that can be represented exactly as an FP number, but
    that's also the case with hex). The difference is that the hex-base
    FP numbers are much shorter. Never more than 14 hex digits in the
    mantissa of a binary64 number compared to up to 751 decimal digits.
    Also, as long as the exponent is in the range of normal numbers, every
    number of the form

    1.hhhhhhhhhhhhhp<exp>

    can be represented exactly as FP number, while there are lots of even
    very short decimal numbers that cannot be represented exactly as FP
    number.

    But to allow this one either needs
    separate hex float prefix or some other syntactic way to
    distinguish them from double integers.

    C99's %a conversion format for printf uses (in regexp syntax):

    -?0xh.h*[+-]d+

    and I dimly remember that at least one Forth system also uses "p" to
    indicate the exponent of a hex float.

    I use that in lxf64 (and also in lxf for 80 bit floats)
    It is very useful for input of exact constants

    1e-6 fh. 0x1.0C6F7A0B5ED8Dp-20 ok
    0x1.0C6F7A0B5ED8Dp-20 e. 1e-6 ok

    works for input and out put.

    Peter

    - anton


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Wed Aug 26 17:04:33 2026
    From Newsgroup: comp.lang.forth

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    C99's %a conversion format for printf uses (in regexp syntax):

    -?0xh.h*[+-]d+

    In converting this to regexp syntax, I accidentially deleted the
    exponent indicator "p"; this should have been:

    -?0xh.h*p[+-]d+

    where h is [0-9a-f] and d is [0-9].

    - 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
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Wed Aug 26 19:40:45 2026
    From Newsgroup: comp.lang.forth

    On 26-08-2026 12:22, albert@spenarnc.xs4all.nl wrote:
    In article <116m3f1$dtoq$1@dont-email.me>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 24-08-2026 13:36, 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.

    Proposed:
    A double precision integer has to start and end with a '.',
    possible other places are allowed:
    .0000.0000.DEAD.BEEF.1234.1234.1234.1234.
    .12.
    All other notations are obsolescent.

    Of course inexact numbers ("floating point") cannot contain two '.'.
    This clears the way to have numbers like
    12.0 12. .123
    naturally meaning floating point.

    Groetjes Albert

    Well, I can be incredibly short about this one: I don't like prefixes.
    Make a parsing word. ;-) D% or D#. Easy, don't need ugly recognizers. My
    arguments should be common knowledge by now. Even if it is adopted, I
    won't follow.

    I agree with you but I did a slight modification with D% and D#
    that leads to a simplification for ordinary numbers alike.
    I don't like the original $ # as seen in iforth. So I added $ # as
    separately loaded parsing works like you D$ D# .
    But now the iforth sources doesn't still compile, you have to
    replace
    $DEADBEEF
    with
    $ DEADBEEF

    Now let "het kwartje val".
    A simple addition to the FIND / FOUND is the following:
    Look up $DEADBEEF. A simple PREFIX flag in $ makes that
    the $ is found as a word.

    WANT $-PREFIX

    S[ ] OK "$DEADBEEF" FOUND

    S[ 156480 ] OK ID.
    $

    The $ found behave as your D$ . It is possibly IMMEDIATE and compiles
    " ' LIT , DEADBEED , " or leaves the stack alone according to STATE.
    (From day one numbers like 123 are STATE aware, no need to change.)
    The parse pointer (>IN or some such) has to advance, not after
    $DEADBEEF but after $.
    That is simple advance the parse pointer with the length of the
    NAME FOUND in every case.
    (Kill the guy with the moustache in starting Forth.)

    This single flag is a far cry from the recognizer proposals.


    Hans Bezemer

    I applaud that! That's how Forth should function! In 4tH, the parsing is
    done with the preprocessor macro "D%". The "hash" name reminds me too
    much of number format generation - so, it became "D%".

    The preprocessor lib has some intelligence, though. Take:

    include lib/dbldot.4th
    include lib/todbl.4th
    include 4pp/lib/double.4pp

    D% 16384 d. cr
    D% -16384 d. cr
    D% 18446744073709551616 d. cr

    Output:

    16384
    -16384
    18446744073709551616

    Intermediate code:

    <no interest to you>
    16384 U>D d. cr
    -16384 -S>D d. cr
    S" 18446744073709551616" S>DOUBLE d. cr

    So, it's clever enough to automatically chose the most fitting
    conversion method, some barely slower than converting it by hand. A
    similar conversion method is used with F% when integers are concerned -
    "Here 10 items or less".

    Hans Bezemer
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Thu Aug 27 12:43:53 2026
    From Newsgroup: comp.lang.forth

    In article <116mtrp$3d9f8$2@paganini.bofh.team>,
    Waldek Hebisch <antispam@fricas.org> wrote:
    albert@spenarnc.xs4all.nl wrote:
    In article <nnd$6d306c76$0159a1e5@5ebe29de058d18a5>,
    <albert@spenarnc.xs4all.nl> wrote:
    In article <116js4d$3le16$1@dont-email.me>,
    Krishna Myneni <krishna.myneni@ccreweb.org> wrote:
    On 8/24/26 11:17 PM, dxf wrote:
    On 25/08/2026 11:51 am, Krishna Myneni wrote:
    On 8/24/26 8:10 PM, dxf wrote:
    On 24/08/2026 9:36 pm, 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.
    ...

    Moore said that about 32-bit (and double operators) back in '89 and >>>>>>> still folks are finding uses.|e-a Getting rid of doubles/input just to >>>>>>> support floating-point which isn't even forth's niche (RPN and all that)
    ... seems so wrong.


    1) Which Forth systems are getting rid of double length integer input? >>>>>>
    I originally did not implement double length integer input in kForth >>>to avoid confusion with floating point. However, with the
    standardization of base prefixes, and with recognizers (though they are >>>not needed for this), it became easy to implement an unambiguous form of >>>input for double length numbers, requiring a base prefix character and a >>>trailing decimal point e.g.

    #-170141183460469231731687303715884105728.
    $ffffffffffffffffffffffffffffffff.
    %10110001111011000101111.

    Interesting because ...

    hex #23E1 decimal f. 230. ok

    works on my system (but apparently not others)
    ...

    How is your example above relevant to interpreting double length >>>>integers? What happens when you append a trailing decimal point to >>>>"#23E1"? Does your system still interpret it as a floating point number? >>>
    My goals was severely restricted. In the absence of prefixes and a
    E fields, make double numbers such that it cannot possible be
    interpreted as an inexact ("floating point") number.

    The next step on this road is to require explicit number prefixes
    for double precision integers and declare the rest obsolescent.
    So each number with a single decimal point or an
    exponent designator lacking a prefix is fp.

    Fine with me.

    Just a little comment: it is easy to input or output floating point
    numbers in hexadecimal. Advantage compared to decimal is that
    input and output can be exact. So hexadecimal prefix on floating
    point numbers makes sense. But to allow this one either needs
    separate hex float prefix or some other syntactic way to
    distinguish them from double integers.

    I'm dabbling around with hex floating point numbers manipulating base
    just fine:

    S[ ] OK 1E-6

    S[ ] OK HEX
    S[ ] OK FDUP FS.
    1.0C6F7A0B5ED8D36600_-5
    S[ ] OK FDUP 20 F.R
    1.0C6F7A0B5ED8D3660000000000000000_-5

    The hexadecimal notation can be read back just fine.
    It just requires the exponent character not to be 'E'.


    --
    Waldek Hebisch
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.22a-Linux NewsLink 1.2