shithub: opus

Download patch

ref: 79e67434981d44fdbdd73a5d8e15fe0164257c90
parent: 6c3788cb536c519fe5cee63f63c706a07c47fc62
author: Jean-Marc Valin <[email protected]>
date: Sun Jun 20 20:13:35 EDT 2010

Fixed testcase

--- a/tests/mathops-test.c
+++ b/tests/mathops-test.c
@@ -151,10 +151,10 @@
    celt_word32 x;
    for (x=8;x<65536;x+=(x>>3))
    {
-      float error = fabs(x-0.25*celt_exp2(celt_log2(x)<<3))/16384;
+      float error = fabs(x-0.25*celt_exp2(celt_log2(x)<<1))/16384;
       if (error>0.004)
       {
-         fprintf (stderr, "celt_log2/celt_exp2 failed: fabs(x-(celt_log2(celt_exp2(x))))>0.001 (x = %ld, error = %f)\n", (long)x,error);
+         fprintf (stderr, "celt_log2/celt_exp2 failed: fabs(x-(celt_exp2(celt_log2(x))))>0.001 (x = %ld, error = %f)\n", (long)x,error);
          ret = 1;
       }
    }