Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3c95f6371219d9abc35fbd9c3cee7503bc34d25afa58525063023cb222b563b3
Ticket: 713653b951c625ef974f5f06b2e96634ca5fb1f9
Floating point precision problems on x86 musl
User & Date: rubicon on 2022-07-13 14:20:05
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    Hello, while running Tcllib tests with Tcl 8.6.12 on 32-bit x86 Alpine Linux, which uses musl libc, I ran into a problem with some math tests failing.
    
    I proceeded to try running the same tests on previous versions of Tcl 8.6, and found that the tests pass on 8.6.10 but fail on 8.6.11.
    
    I think the problem started with https://core.tcl-lang.org/tcl/info/5cb42f70ad0e65ba , and I managed to suppress the problem by disabling the special i386 TCL_IEEE_DOUBLE_ROUNDING and TCL_DEFAULT_DOUBLE_ROUNDING macros.
    
    However, not being familiar with low-level programming, I'm not sure if this is the correct way of fixing the problem.
    
    While looking at that commit, I noticed that a few tests were added to expr.test in Tcl's own testsuite, I ran the tests in expr.test (on Tcl 8.6.12) and as expected, some of them fail.
    
    I would appreciate it if someone could look into the issue, and see if those i386-specific macros are still needed on musl libc systems, or if the fix should be made elsewhere.
    
    I will try to attach the output from Tcl's expr tests and Tcllib's math tests.
    
    Thank you.
    
  5. foundin changed to: "8.6.11"
  6. is_private changed to: "0"
  7. login: "rubicon"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "3aa20afe081663d388162c9649bf5fdd7cc27ed8"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "rubicon"
  14. subsystem changed to: "48. Number Handling"
  15. title changed to: "Floating point precision problems on x86 musl"
  16. type changed to: "Bug"