mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-20 22:03:13 +01:00
Implemented SIMD rsqrt.
This commit is contained in:
@@ -70,6 +70,12 @@ TEST_CASE("libm", "")
|
||||
REQUIRE(bx::equal(bx::exp(xx), ::expf(xx), 0.00001f) );
|
||||
}
|
||||
|
||||
for (float xx = 0.0f; xx < 100.0f; xx += 0.1f)
|
||||
{
|
||||
bx::writePrintf(writer, "rsqrt(%f) == %f (expected: %f)\n", xx, bx::rsqrt(xx), 1.0f/::sqrtf(xx) );
|
||||
REQUIRE(bx::equal(bx::rsqrt(xx), 1.0f/::sqrtf(xx), 0.00001f) );
|
||||
}
|
||||
|
||||
for (float xx = 0.0f; xx < 100.0f; xx += 0.1f)
|
||||
{
|
||||
bx::writePrintf(writer, "sqrt(%f) == %f (expected: %f)\n", xx, bx::sqrt(xx), ::sqrtf(xx) );
|
||||
|
||||
Reference in New Issue
Block a user