Fixed testcase
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Mon, 21 Jun 2010 04:13:35 +0000 (00:13 -0400)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Mon, 21 Jun 2010 04:13:35 +0000 (00:13 -0400)
tests/mathops-test.c

index dd48baa..ca1ef34 100644 (file)
@@ -151,10 +151,10 @@ void testexp2log2(void)
    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;
       }
    }