From: anton@mips.complang.tuwien.ac.at   
      
   dxf writes:   
   >On 13/07/2025 7:01 pm, Anton Ertl wrote:   
   >> ...   
   >> For Forth, Inc. and MPE AFAIK their respective IA-32 Forth system was   
   >> the only one with hardware FP for many years, so there probably was   
   >> little pressure from users for bit-identical results with, say, SPARC,   
   >> because they did not have a Forth system that ran on SPARC.   
   >   
   >What do you mean by "bit-identical results"? Since SSE2 comes without   
   >transcendentals (or basics such as FABS and FNEGATE) and implementers   
   >are expected to supply their own, if anything, I expect results across   
   >platforms and compilers to vary.   
      
   There are operations for which IEEE 754 specifies the result to the   
   last bit (except that AFAIK the representation of NaNs is not   
   specified exactly), among them F+ F- F* F/ FSQRT, probably also   
   FNEGATE and FABS. It does not specify the exact result for   
   transcendental functions, but if your implementation performs the same   
   bit-exact operations for computing a transcendental function on two   
   IEEE 754 compliant platforms, the result will be bit-identical (if it   
   is a number). So just use the same implementations of transcentental   
   functions, and your results will be bit-identical; concerning the   
   NaNs, if you find a difference, check if the involved values are NaNs.   
      
   - 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 2023 proceedings: http://www.euroforth.org/ef23/papers/   
   EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|