Sujet : Re: Display Engineering Notation with SI Prefix
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forthDate : 30. Aug 2024, 09:03:26
Autres entêtes
Organisation : Ausics - https://newsgroups.ausics.net
Message-ID : <66d17ccd$1@news.ausics.net>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla Thunderbird
On 30/08/2024 4:30 pm, mhx wrote:
On Fri, 30 Aug 2024 2:13:43 +0000, dxf wrote:
[..]
3 set-precision ok
-1e 0e 0.5e 0e z^ z. 0.0000000000000000612 + i1. ok
[..]
Can't say without knowing what was the criteria. If a user wants
to show the result to 3 significant digits, who can argue with that.
3 significant digits is about right for (ENG.) applications.
When the user wants 3 significant digits according to the mathematical
definition there is no discussion that SET-PRECISION is appropriate.
If a system is to produce 100 Watts, and an approximate model of the
losses returns 0.0000000000000000612 Watts, then that is quite probably
not the wanted output (because it tells you the resolution of the
floating point package, not the accuracy of the approximation).
However, when that same model returns 100 Watts for the full output
power, 100 or 100.0 is (probably) the expectation. Extra steps are
needed
to print the losses in a useful way, and those steps match perfectly
with PLACES. PLACES would also work to print the full power as 100.
It is not ideal, but the reason it is not ideal has nothing to do with
SET-PRECISION .
If the argument is certain apps work well with PLACES (or equivalent)
I can accept that. Because Fortran and C had it from the beginning
I felt it was important to provide it. At the same time I also found
SET-PRECISION to be useful. I can't imagine FE. being used with
anything but SET-PRECISION. So for me, an fp package needs to offer
both schemes.