added tests for rcp/rsqrt double

This commit is contained in:
Evghenii
2014-02-02 18:19:56 +01:00
parent 3a72e05c3e
commit 4515dd5c89
2 changed files with 32 additions and 0 deletions

16
tests/test-148.ispc Normal file
View File

@@ -0,0 +1,16 @@
export uniform int width() { return programCount; }
export void f_f(uniform float RET[], uniform float aFOO[]) {
double x = aFOO[programIndex];
double d, invsqrt = rsqrt(x);
d = (x * (invsqrt * invsqrt)) - 1.0d0;
if (d < 0.0d0) d = -d;
RET[programIndex] = d > 1d-5;
}
export void result(uniform float RET[]) {
RET[programIndex] = 0;
}