diff options
author | Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> | 2008-04-05 08:36:05 +0400 |
---|---|---|
committer | Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> | 2008-04-05 08:36:05 +0400 |
commit | 5a7d9b2c62323c4d77790493d2de580e0a659bad (patch) | |
tree | af1b972353dce53bd77b1e3c158288fec7039099 /tests | |
parent | d883670bf792ad02750fe481646bcd8b4cf6ad72 (diff) |
Fixed rsqrt testcase for float
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mathops-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/mathops-test.c b/tests/mathops-test.c index b7ffdac..214e2c2 100644 --- a/tests/mathops-test.c +++ b/tests/mathops-test.c @@ -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; |