#2271: floor, ceiling, round :: Double -> Int are awesomely slow ------------------------------------------+--------------------------------- Reporter: dons | Owner: daniel.is.fischer Type: bug | Status: infoneeded Priority: low | Milestone: 7.0.1 Component: libraries/base | Version: 7.1 Keywords: performance, math, double | Testcase: Blockedby: | Difficulty: Unknown Os: Unknown/Multiple | Blocking: Architecture: Unknown/Multiple | Failure: None/Unknown ------------------------------------------+--------------------------------- Changes (by daniel.is.fischer):
* status: patch => infoneeded Comment: Great, I just was notified that there's a bug in rintf for some versions of glibc (apparently only on x86_64): http://sources.redhat.com/bugzilla/show_bug.cgi?id=10089 And thus round :: Float -> Int gets some values wrong there. {{{ Cround/Int *** Failed! Falsifiable (after 2333 tests): 2788790.8 Failure {usedSeed = 678847334 2020505879, usedSize = 2332, reason = "Falsifiable", labels = []} Now the funny part is that this seems to be rintf() bug in glibc (only x86_64), see http://sources.redhat.com/bugzilla/show_bug.cgi?id=10089 (I've write a small C program to check the output for this number and it does return the wrong result, i.e. 2788790). So I thought that I'll let you know about it before anyone else runs into the same issue. All the other tests passed just fine, btw. }}} I'll see whether I can cook up a fast bit-fiddler in C then. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2271#comment:18> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs