Article View: comp.lang.forth
Article #167Re: Tests for (DDFS.)
From: Anton Ertl
Date: Thu, 22 Oct 2026 06:32
Date: Thu, 22 Oct 2026 06:32
22 lines
2284 bytes
2284 bytes
marcel hendrix <mhx@iae.nl> writes:
>None of my floating point code rounds in any of the printing words, it
>indeed truncates. For it to be automatic, an idea about the precision
>of the calculation is needed and the printing knows nothing about that.
I don't see a difference between rounding and truncation here. If the
program knows the precision, it can use a appropriate word that
outputs only the significant digits or marks the last significant
digit (e.g., by underlining it). However, given that the program
usually does not compute this information, the Gforth words that you
can pass a precision to, such as F.RDP and E.P, treat it as a minimum
rather than exact number of significant digits to be shown, i.e., they
may show more digits. E.g.:
123e 2 e.p \ prints "123e"
- 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
Technical Details
Message-ID:
<2026Oct22.083247@mips.complang.tuwien.ac.at>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11b7rcu$31u3u$1@dont-email.me> <11b8427$35l54$1@dont-email.me> <11b887g$p2rm$1@dont-email.me> <6ad8043a$1@news.ausics.net> <11b9pei$28p9l$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.lang.forth Subject: Re: Tests for (DDFS.) Date: Thu, 22 Oct 2026 06:32:47 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 22 Message-ID: <2026Oct22.083247@mips.complang.tuwien.ac.at> References: <11b7rcu$31u3u$1@dont-email.me> <11b8427$35l54$1@dont-email.me> <11b887g$p2rm$1@dont-email.me> <6ad8043a$1@news.ausics.net> <11b9pei$28p9l$1@dont-email.me> Injection-Date: Thu, 22 Oct 2026 06:46:08 +0000 (UTC) Injection-Info: dont-email.me; logging-data="644429"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/awLWILoFgsYXPMNVX0guw"; posting-host="149e461fbbae38ec7b7c6c8f4381520c" Cancel-Lock: sha1:ASETA1QfL4WIO5ft8w6xVuPBlXI= sha256:Wi9gFyuE9Fs/gwwJ/0gAyBB/j7Pape2dAGHWWaWO0jA= sha1:lxWkLJ7PTGDD2ZNxYpw1yowIoH0= sha256:DpQfafSRv5VkkarPd4eIh2fJuFzvKOcpN5NdAdrY/GY= X-newsreader: xrn 10.11