• Re: History of CREATE...DOES> =?UTF-8?B?Pw==?=

    From minforth@21:1/5 to All on Fri Aug 2 06:27:48 2024
    Really? With

    SET-PRECISION / PRECISION ...
    Return the number of significant digits currently used
    by F.

    and with

    F. ...
    Display, with a trailing space, the top number on the
    floating-point stack using fixed-point notation:
    [-] ⟨digits⟩.⟨digits0⟩

    i.e. digits+digits0 = number of significant digits

    and with

    ⟨sign⟩ := { + | - }
    ⟨digits⟩ := ⟨digit⟩⟨digits0⟩
    ⟨digits0⟩ := ⟨digit⟩*
    ⟨digit⟩ := { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }

    F. should be standardized clearly enough.

    F.ex.

    Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc.
    Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
    Type `bye' to exit
    5 set-precision ok
    1.1e-2 f. 0.011 ok <- expected 5 digits i.e. 0.0110
    1.1e-40 f. 0.00000000000000000000000000000000000000011 ok

    is just an implementation-defined peculiarity.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@21:1/5 to All on Fri Aug 2 07:54:50 2024
    There are so many implementation-defined options and ambiguous
    conditions in the fp-number standard which altogether leave a
    lot of leeway. And f.ex. omission of trailing zeros isn't
    specified at all.

    So what are you missing? It is a playing field _deliberately_
    made with few boundaries.

    Theoretically one could argue that a reference Forth system
    or a specified set ouf fp output formats would be of help.
    But nobody cares. Individual narrow interpretations even less.
    So what ..

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)