Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #132064
| Date | 2024-08-29 22:39 +1000 |
|---|---|
| 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> |
| From | dxf <dxforth@gmail.com> |
| Message-ID | <66d06bf8@news.ausics.net> (permalink) |
| Organization | Ausics - https://newsgroups.ausics.net |
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.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
Display Engineering Notation with SI Prefix dxf <dxforth@gmail.com> - 2024-08-29 01:32 +1000
Re: Display Engineering Notation with SI Prefix dxf <dxforth@gmail.com> - 2024-08-29 20:02 +1000
Re: Display Engineering Notation with SI Prefix mhx@iae.nl (mhx) - 2024-08-29 10:39 +0000
Re: Display Engineering Notation with SI Prefix dxf <dxforth@gmail.com> - 2024-08-29 22:39 +1000
Re: Display Engineering Notation with SI Prefix mhx@iae.nl (mhx) - 2024-08-29 14:23 +0000
Re: Display Engineering Notation with SI Prefix dxf <dxforth@gmail.com> - 2024-08-30 12:13 +1000
Re: Display Engineering Notation with SI Prefix mhx@iae.nl (mhx) - 2024-08-30 06:30 +0000
Re: Display Engineering Notation with SI Prefix dxf <dxforth@gmail.com> - 2024-08-30 18:03 +1000
Re: Display Engineering Notation with SI Prefix mhx@iae.nl (mhx) - 2024-08-30 08:26 +0000
Re: Display Engineering Notation with SI Prefix dxf <dxforth@gmail.com> - 2024-08-30 19:24 +1000
Re: Display Engineering Notation with SI Prefix dxf <dxforth@gmail.com> - 2024-08-31 11:11 +1000
csiph-web