ref: 5a7d9b2c62323c4d77790493d2de580e0a659bad
parent: d883670bf792ad02750fe481646bcd8b4cf6ad72
author: Jean-Marc Valin <[email protected]>
date: Sat Apr 5 10:36:05 EDT 2008
Fixed rsqrt testcase for float
--- a/tests/mathops-test.c
+++ b/tests/mathops-test.c
@@ -61,10 +61,10 @@
double ratio;
celt_word16_t val;
val = celt_rsqrt(i);
- ratio = val*sqrt(i)/32768;
+ ratio = val*sqrt(i)/Q15ONE;
if (fabs(ratio - 1) > .05)
{
- fprintf (stderr, "sqrt failed: sqrt(%d)="WORD" (ratio = %f)\n", i, val, ratio);
+ fprintf (stderr, "rsqrt failed: rsqrt(%d)="WORD" (ratio = %f)\n", i, val, ratio);
ret = 1;
}
i+= i>>10;