peter <pete…@tin.it> writes:
>I might do a FS.N where n would be significant digits
Or you implement f.rdp
<https://net2o.de/gforth/Floating_002dpoint-output.html#index-f_002erdp>
and get something that is useful for a number of other use cases as
well. F.RDP uses scientific notation if d (decimal places) is too big
for r (field width), among other conditions. So if you want
scientific notation, use np>nr. It does not limit itself to p digits,
if it has more room; p is just the minimum shown precision; it's used
for deciding between fixed-point and scientific notation.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2026 CFP: http://www.euroforth.org/ef26/cfp.html