Deutsch   English   Français   Italiano  
<66d06bf8@news.ausics.net>

View for Bookmarking (what is this?)
Look up another Usenet article

Date: Thu, 29 Aug 2024 22:39:20 +1000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Display Engineering Notation with SI Prefix
Newsgroups: comp.lang.forth
References: <66cf431d$1@news.ausics.net> <66d04731$1@news.ausics.net>
 <b551b3b6939980752fc024b73e3e722a@www.novabbs.com>
Content-Language: en-GB
From: dxf <dxforth@gmail.com>
In-Reply-To: <b551b3b6939980752fc024b73e3e722a@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: news.ausics.net
Message-ID: <66d06bf8@news.ausics.net>
Organization: Ausics - https://newsgroups.ausics.net
Lines: 69
X-Complaints: abuse@ausics.net
Path: ...!weretis.net!feeder9.news.weretis.net!news.bbs.nz!news.ausics.net!not-for-mail
Bytes: 2670

On 29/08/2024 8:39 pm, mhx wrote:
> On Thu, 29 Aug 2024 10:02:26 +0000, dxf wrote:
> 
>> On 29/08/2024 1:32 am, dxf wrote:
> [..]
>> The real (FE.) has no such issues and works as expected ...
>>
>> VFX Forth 64 for Windows x64
>>   © MicroProcessor Engineering Ltd, 1998-2023
>>
>>  Version: 5.43 [build 4241]
>>  Build date: 22 December 2023
>>
>> 2 set-precision  ok
>> 1.234e 1e2 f* -1 (fe.) type 120.E0 ok
> 
> Using the non-standard set-precision of iForth:
> 
> FORTH> 2 set-precision 1.234e f. 1.23  ok
> FORTH> 1 set-precision 1.234e f. 1.2  ok
> FORTH> 3 set-precision 1.234e f. 1.234  ok
> FORTH> 3 set-precision 1234e  f. 1234.000  ok
> FORTH> 0 set-precision 1234e  f. 1234  ok

So iForth PRECISION equates to 'decimal places'.  In VFX 'decimal
places' is achieved thus:

1.234e 2 0 f.r 1.23 ok
1.234e 1 0 f.r 1.2 ok
1.234e 3 0 f.r 1.234 ok
1234e  3 0 f.r 1234.000 ok
1234e  0 0 f.r 1234. ok

PRECISION only comes into effect in 'significant digits' mode:

3 set-precision

1.234e -1 0 f.r 1.23 ok
12.34e -1 0 f.r 12.3 ok
123.4e -1 0 f.r 123. ok
1234.e -1 0 f.r 1230. ok

or simply:

1.234e f. 1.23  ok
12.34e f. 12.3  ok
123.4e f. 123.  ok
1234.e f. 1230.  ok
 
> Didn't F83 have DIGITS ?

Neither Laxen/Perry F83 nor Forth-83 had floating point.  You may be
thinking of PLACES from 'The Forth Vendors Group Standard Floating
Point Extension' (?)  That was initially considered by the ANS-TC and
documented in BASIS17:

  12.1.2032   PLACES  

  ( u -- )

  Set the number of decimal places (digits to the right of the radix
  point) displayed by E. and F.

PLACES would be synonymous with your PRECISION .

Has any language other that Forth opted for 'significant digits' over
(or in addition to) 'decimal places'?  The former seems particularly
suited to engineering.