Sujet : Re: Parsing timestamps?
De : anton (at) *nospam* mips.complang.tuwien.ac.at (Anton Ertl)
Groupes : comp.lang.forthDate : 14. Jul 2025, 11:11:57
Autres entêtes
Organisation : Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID : <2025Jul14.121157@mips.complang.tuwien.ac.at>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : xrn 10.11
Paul Rubin <
no.email@nospam.invalid> writes:
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
So just use the same implementations of transcentental functions, and
your results will be bit-identical
>
Same implementations = same FP operations in the exact same order?
Same operations with the same data flow. Independent operations can
be reordered.
That
seems hard to ensure, if the functions are implemented in a language
that leaves anything up to a compiler.
Even gcc heeds data flow of FP operations unless you tell it with
-fastmath that anything goes.
Also, in the early implementations x87, 68881, NS320something(?),
transcententals were included in the coprocessor and the workings
weren't visible.
The bigger problem with at least x87 is that math you don't always get
bit-identical results even for basic operations such as addition,
thanks to double rounding. So even if you implement transcendentals
yourself based basic operations, you can see results that are not
bit-identical.
- anton
-- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.htmlcomp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: https://forth-standard.org/EuroForth 2023 proceedings: http://www.euroforth.org/ef23/papers/EuroForth 2024 proceedings:
http://www.euroforth.org/ef24/papers/