Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #135397
| From | marcel hendrix <mhx@iae.nl> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: E.P E. E.EXACT |
| Date | 2026-08-23 00:50 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <116d931$18ugj$1@dont-email.me> (permalink) |
| References | <2026Aug5.200203@mips.complang.tuwien.ac.at> <1156l0r$19nm9$1@dont-email.me> <6a77f77b$1@news.ausics.net> <11592lt$65r8$1@dont-email.me> <nnd$632a7052$6afb2a97@952a43c4d6a59389> |
On 8/22/2026 4:43 PM, albert@spenarnc.xs4all.nl wrote:
> In article <11592lt$65r8$1@dont-email.me>, marcel hendrix <mhx@iae.nl> wrote:
>> On 8/9/2026 5:43 AM, dxf wrote:
>> [..]
>>> Under VFX and DX-Forth 'decimal places' requires F.R ( F. only does
>>> 'significant digits' with trailing zeros truncated). If one asks for
>>> 200 decimal places it obeys - up to the limit of the HOLD buffer.
>>
>> Is there a use case for that behavior or is it just a feature?
>>
>> I would expect F.R to print the number with more than what PLACES
>> is set to, in order to prevent saving and restoring a user variable.
>> In such a case more than 20 places would be a bit unusual, and one
>> would need to make sure the extra digits are not total rubbish.
>
> Why?
> All floating point numbers are rubbish from a certain point on,
> and you have to keep track of that yourself.
>
> 1E2
> OK
> 100 F.R
> 9.9999999999999999982652765240231929055880755186080932617187500000000000000000000000000000000000000000E1 OK
>
> Only BASIC programmers don't realize that all fp numbers are inexact,
> e.g. sin(1^100) may make sense in mathematics, but not the FORTRAN
> X= SIN(1E100)
Sorry, I don't see what point you are making here.
That ' 1E2 100 F.R ' is would definitely not be my intention.
FORTH> help f.r
F.R "f-dot-r" IFORTH
( n -- ) ( F: r -- )
Display the floating point number r using the conversion rules as
for F., right aligned in a field n characters wide. If the number
of characters required to display r is greater than n, all digits
are displayed with no leading spaces in a field as wide as
necessary.
When the fieldwidth is too small, F.R and its variants try to
squeeze the number in by switching to exponential notation. When
that doesn't help, they print a field of asterisks. The switch to
exponential notation happens when |r| > 10^PRECISION . When |r| <
10^-PRECISION , "0.00.." is printed.
2 set-precision ok
1e2 57 f.r 100.00 ok
1e2 1 f.r * ok
1e2 2 f.r ** ok
1e2 3 f.r *** ok
1e2 4 f.r **** ok
1e2 5 f.r ***** ok
1e2 15 f.r 100.00 ok
1e2 5 f.r ***** ok
1e2 10 f.r 100.00 ok
1e2 6 f.r 100.00 ok
12 set-precision ok
1e2 6 f.r ****** ok
1e2 16 f.r 100.000000000000 ok
1e2 20 f.r 100.000000000000 ok
-marcel
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