Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #135341
| From | peter <peter.noreply@tin.it> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: E.P E. E.EXACT |
| Date | 2026-08-12 18:03 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <20260812180329.0000258a@tin.it> (permalink) |
| References | (7 earlier) <6a76b305$1@news.ausics.net> <2026Aug8.083201@mips.complang.tuwien.ac.at> <115e3r1$3l8a0$1@dont-email.me> <2026Aug11.065636@mips.complang.tuwien.ac.at> <115gojb$ghb5$1@dont-email.me> |
On Tue, 11 Aug 2026 22:16:56 -0500 Krishna Myneni <krishna.myneni@ccreweb.org> wrote: > On 8/10/26 23:56, Anton Ertl wrote: > > Krishna Myneni <krishna.myneni@ccreweb.org> writes: > >> On 8/8/26 01:32, Anton Ertl wrote: > >>> F. specifies a required ".", but that's missing here. > >>> > >> The only indication in the standard that a trailing "." appears is the > >> example in the appendix; otherwise, my reading of the standard is > >> ambiguous on the trailing decimal point. > > > > The standard specifies: > > > > | 12.6.2.1427 F. > > | [...] > > | [-] <digits>.<digits0> > > > > If they intended the "." to be optional, they would have specified that as > > > > [-] <digits>[.<digits0>] > > > >> It should be explicitly stated > >> if the trailing decimal point was the intent. > > > > It is. > > > > Actually, F. in its present functionality in kForth works for me, > despite it being non-standard. It provides 6 significant digits of > output and switches between fixed point and scientific notation to > produce the shortest output with 6 significant digits. This output is > useful to me most of the time. The trailing decimal point seems like a > good idea when it's output is in fixed point format. This is how I just implemented Anton's E. in my system. Precision fixed at 6 digits, print both F. and FS. to memory and take the shortest to print out. I found that to be a useful tool to use interactively. Peter > > When I need control over the number of significant digits displayed, I > use SET-PRECISION and FS. and when I need fixed point output with a > fixed number of decimal places, right-justified within a field of > specified width, I use F.RD (defined in source in strings.4th). These > three words, "F." "FS." and "F.RD", in their present functionality, have > met all of my needs up to now. > > FS. can print an arbitrary number of digits. > > Example: > > pad 8 erase > ok > 1 pad ! > ok > 800 set-precision > ok > pad f@ fs. \ ignore spaces and line breaks in output below > 4. > 940 656 458 412 465 441 765 687 928 682 > 213 723 650 598 026 143 247 644 255 856 > 825 006 755 072 702 087 518 652 998 363 > 616 359 923 797 965 646 954 457 177 309 > 266 567 103 559 397 963 987 747 960 107 > 818 781 263 007 131 903 114 045 278 458 > 171 678 489 821 036 887 186 360 569 987 > 307 230 500 063 874 091 535 649 843 873 > 124 733 972 731 696 151 400 317 153 853 > 980 741 262 385 655 911 710 266 585 566 > 867 681 870 395 603 106 249 319 452 715 > 914 924 553 293 054 565 444 011 274 801 > 297 099 995 419 319 894 090 804 165 633 > 245 247 571 478 690 147 267 801 593 552 > 386 115 501 348 035 264 934 720 193 790 > 268 107 107 491 703 332 226 844 753 335 > 720 832 431 936 092 382 893 458 368 060 > 106 011 506 169 809 753 078 342 277 318 > 329 247 904 982 524 730 776 375 927 247 > 874 656 084 778 203 734 469 699 533 647 > 017 972 677 717 585 125 660 551 199 131 > 504 891 101 451 037 862 738 167 250 955 > 837 389 733 598 993 664 809 941 164 205 > 702 637 090 279 242 767 544 565 229 087 > 538 682 506 419 718 265 533 447 265 625 > 000 000 000 000 000 000 000 000 000 000 > 000 000 000 000 000 000 0 > e-324 ok > > There are 751 significant digits, representing 2^-1074. The bit pattern > is an IEEE double precision *subnormal* number interpreted as > 2^-52*(2^emin), where emin = -1022 is the minimum power of 2 exponent. > 2^-52 is the significand, which is the 1 stored in the lsb of the > binary64 floating point number. > > Wolfram alpha can be used to verify all of the digits printed above. > > We should be able to do this arithmetic with the big arithmetic package, > but I get a segfault because the output buffer is too small, I think. It > should be fixable. > > -- > Krishna > > > > >
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-05 18:02 +0000
Re: E.P E. E.EXACT Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-06 08:13 -0500
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-06 14:00 +0000
Re: E.P E. E.EXACT Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-06 10:45 -0500
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-06 15:58 +0000
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-06 17:20 +0000
Re: E.P E. E.EXACT marcel hendrix <mhx@iae.nl> - 2026-08-06 21:05 +0200
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-06 20:38 +0000
Re: E.P E. E.EXACT Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-06 18:44 -0500
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-07 11:03 +1000
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-07 10:11 +0000
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-08 14:39 +1000
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-08 06:32 +0000
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-09 04:50 +1000
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-10 20:01 +1000
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-10 18:06 +0000
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-10 17:24 +0000
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-11 14:01 +1000
Re: E.P E. E.EXACT Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-10 22:10 -0500
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-11 04:56 +0000
Re: E.P E. E.EXACT Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-11 22:16 -0500
Re: E.P E. E.EXACT Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-12 05:47 -0500
Re: E.P E. E.EXACT peter <peter.noreply@tin.it> - 2026-08-12 18:03 +0200
Re: E.P E. E.EXACT Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-12 11:48 -0500
Re: E.P E. E.EXACT marcel hendrix <mhx@iae.nl> - 2026-08-08 09:14 +0200
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-08 09:40 +0000
Re: E.P E. E.EXACT marcel hendrix <mhx@iae.nl> - 2026-08-08 15:26 +0200
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-10 16:43 +0000
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-09 13:43 +1000
Re: E.P E. E.EXACT marcel hendrix <mhx@iae.nl> - 2026-08-09 07:19 +0200
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-10 19:15 +1000
Re: E.P E. E.EXACT marcel hendrix <mhx@iae.nl> - 2026-08-10 13:17 +0200
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-10 22:59 +1000
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-10 23:54 +1000
Re: E.P E. E.EXACT marcel hendrix <mhx@iae.nl> - 2026-08-10 20:42 +0200
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-11 17:10 +1000
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-12 14:04 +1000
Re: E.P E. E.EXACT albert@spenarnc.xs4all.nl - 2026-08-22 16:43 +0200
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-22 15:47 +0000
Re: E.P E. E.EXACT albert@spenarnc.xs4all.nl - 2026-08-22 18:27 +0200
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-22 16:40 +0000
Re: E.P E. E.EXACT albert@spenarnc.xs4all.nl - 2026-08-22 19:42 +0200
Re: E.P E. E.EXACT anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-22 18:03 +0000
Re: E.P E. E.EXACT albert@spenarnc.xs4all.nl - 2026-08-22 22:56 +0200
Re: E.P E. E.EXACT marcel hendrix <mhx@iae.nl> - 2026-08-23 00:50 +0200
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-23 12:25 +1000
Re: E.P E. E.EXACT Hans Bezemer <the.beez.speaks@gmail.com> - 2026-08-09 14:52 +0200
Re: E.P E. E.EXACT Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-08-07 07:50 -0500
Re: E.P E. E.EXACT dxf <dxforth@gmail.com> - 2026-08-08 12:33 +1000
Re: E.P E. E.EXACT albert@spenarnc.xs4all.nl - 2026-08-22 17:01 +0200
Re: E.P E. E.EXACT albert@spenarnc.xs4all.nl - 2026-08-22 16:15 +0200
csiph-web