Article View: comp.lang.forth
Article #95Re: FCONSTANT specification
From: Anton Ertl
Date: Fri, 16 Oct 2026 15:40
Date: Fri, 16 Oct 2026 15:40
53 lines
3124 bytes
3124 bytes
albert@spenarnc.xs4all.nl writes:
>A fp number represents a rational range, it nominal value plus or minus
>half an ulp.
What makes you think that the result of
3 s>f
or
s" 3e" >float drop
represents a range? This value can be represented exactly as FP
value, there is no rounding happening in this conversion.
And why should it represent the range
2.9999999999999997779553950749686919152736663818359375e to
3.0000000000000002220446049250313080847263336181640625e
in particular?
Further, when we perform
6 s>f 3 s>f f-
why should the results of the individual conversions (none of which
performs rounding) represent ranges? Why should the result of the
subtraction (which does not perform any rounding, either, and does not
set the "inexact" flag in the FPU) represent a range.
But even if we assume that the results of the conversions are ranges,
why should the result of the subtraction be the interval above,
instead of the interval that interval arithmetic would give, which is
a range that is 3 times bigger in this case (2 times, because the
interval you claim for 6 is twice as big as that for 3, and 1 time due
to the interval of 3).
As mentioned, thinking about FP numbers as "imprecise" or intervals
etc. leads you down the path to wrong conclusions.
A better way to think about them is: Each FP number has an exact
value, but in some cases conversions to FP and FP operations round,
because there is no FP value for the exact result; this rounding leads
to errors. The size of this error is the subject of numerical
analysis.
- 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:
<2026Oct16.174024@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:
<11aide4$1ibse$1@dont-email.me> <2026Oct14.102517@mips.complang.tuwien.ac.at> <6ad02ef0$1@news.ausics.net> <2026Oct15.075508@mips.complang.tuwien.ac.at> <nnd$259bc6d7$095e6dc6@c0b8c58c46e9a352>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: FCONSTANT specification Date: Fri, 16 Oct 2026 15:40:24 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 53 Message-ID: <2026Oct16.174024@mips.complang.tuwien.ac.at> References: <11aide4$1ibse$1@dont-email.me> <2026Oct14.102517@mips.complang.tuwien.ac.at> <6ad02ef0$1@news.ausics.net> <2026Oct15.075508@mips.complang.tuwien.ac.at> <nnd$259bc6d7$095e6dc6@c0b8c58c46e9a352> Injection-Date: Fri, 16 Oct 2026 16:01:55 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3580791"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FDyUAcqy/YoO2ZMu2Bgg9"; posting-host="eb1d16796a2f3c3c419013704a6bb9be" Cancel-Lock: sha1:1h8Ihga1sMjCchfCLDYriwejI1A= sha256:UFRIL8ujiKW8PjgrfokKZlJGnQosgP1WRwGrMyzHYPU= sha1:lHTvku8GJrVbKg1Uv7Ubyr234Ow= sha256:MRSIqJkVh9ucXm/h0CLvQaj8Z4hR/JzxppL8IWrJ/MQ= X-newsreader: xrn 10.11