Skip to content
Snippets Groups Projects
Commit 5a7d9b2c authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Fixed rsqrt testcase for float

parent d883670b
No related branches found
No related tags found
No related merge requests found
......@@ -61,10 +61,10 @@ void testrsqrt(void)
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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment