Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/celt-0.7.0.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2008-04-05 08:36:05 +0400
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2008-04-05 08:36:05 +0400
commit5a7d9b2c62323c4d77790493d2de580e0a659bad (patch)
treeaf1b972353dce53bd77b1e3c158288fec7039099 /tests
parentd883670bf792ad02750fe481646bcd8b4cf6ad72 (diff)
Fixed rsqrt testcase for float
Diffstat (limited to 'tests')
-rw-r--r--tests/mathops-test.c4
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;