michalkonecny / aern2

A Haskell library for Approximating Exact Real Numbers (AERN) based on interval computation. (aern2 is a rewrite of aern.)
23 stars 3 forks source link

aern2-mp-0.2.8.0 testsuite failing Stackage Nightly build #11

Open juhp opened 2 years ago

juhp commented 2 years ago
    Failures:

      src/AERN2/MP/Float/Tests.hs:369:7: 
      1) AERN2.MP.Float.MPFloat, approximate sqrt, up ~ down
           Falsified (after 2 tests):
             Approx 15 30517 0 15
             args:
                 x = Approx 15 30517 0 15 ~ Just 15 bits (dR/dx = 0.0000131071906047657745043794685638953272099893609947685035876929759979248046875 ~ NormBits (-16) bits)
                 L = Approx 15 22887 0 0 ~ Just 0 bits (dR/dL = 1 ~ NormBits 0 bits)
                 R = Approx 15 38147 0 0 ~ Just 0 bits (dR/dR = 1 ~ NormBits 0 bits)
                 |R-L| = Approx 15 15260 0 0 ~ Just 0 bits (dR/d|R-L| = 0 ~ NormZero bits)
              tolerance: <= 2^(10)

      To rerun use: --match "/AERN2.MP.Float/MPFloat/approximate sqrt/up ~ down/"

    Randomized with seed 1833925525

    Finished in 11.7850 seconds
    304 examples, 1 failure
michalkonecny commented 4 months ago

I think I was a bit too ambitious in stating accuracy properties for arbitrary precision floating-point operations. Without a rather laborious rigorous analysis, we cannot be entirely sure we will never get failures of this sort (even though they are currently very rare). I plan to substantially relax these properties to resolve the issue.