Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,252
    • Issues 5,252
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 561
    • Merge requests 561
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #19569
Closed
Open
Issue created Mar 20, 2021 by Sebastian Graf@sgraf812Developer

Floating Point regression in NoFib's `imaginary/integrate` benchmark

It appears that recent master commits fail to pass NoFib. Specifically, imaginary/integrate fails with a stdout mismatch in modes norm and slow (but not fast, which was used by CI):

../../runstdtest/runstdtest ./integrate  -o1 integrate.stdout -o1 integrate.stdout  -ghc-timing +RTS -V0 -RTS    1000000;
0.64user 0.00system 0:00.65elapsed 100%CPU (0avgtext+0avgdata 11252maxresident)k                                                                                                                                                                                             0inputs+16outputs (0major+1491minor)pagefaults 0swaps                                                                                                                                                                                                                        
././integrate +RTS -V0 -RTS 1000000 < /dev/null                                                                                                                                                                                                                              
expected stdout not matched by reality                                                                                                                                                                                                                                       
--- integrate.stdout    2019-11-20 16:38:31.157747042 +0100                                                                                                                                                                                                                  
+++ /tmp/runtest553570.1        2021-03-20 18:12:57.094954877 +0100                                                                                                                                                                                                          
@@ -1 +1 @@                                                                                                                                                                                                                                                                  
-9.093955583391733e28                                                                                                                                                                                                                                                        
+1.9105614312239304e29
make: *** [../../mk/target.mk:101: runtests] Error 1

The first commit with which I could reproduce the issue was 4196969c. Its direct parent, f78f001c, doesn't report an output mismatch.

I suspect that the different literal desugaring produces floating point literals that are associated slightly differently.

I think that benchmark may be flawed anyway: I accumulates an ever-growing FP error. While fast still manages to output 0 at the end, the other modes report absurdly high deviations from the expected 0.

We should diagnose if we got something wrong and fix it before we release 9.2.

Edited Mar 20, 2021 by Sebastian Graf
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking