diff --git a/tests/test-147.ispc b/tests/test-147.ispc new file mode 100644 index 00000000..4091a78d --- /dev/null +++ b/tests/test-147.ispc @@ -0,0 +1,16 @@ + +export uniform int width() { return programCount; } + + +export void f_f(uniform float RET[], uniform float aFOO[]) { + double x = aFOO[programIndex&0x3]; + double d, ix; + ix = rcp(x); + d = (ix - 1.0d0 / x); + d = (d < 0.0d0) ? -d : d; + RET[programIndex] = (d < 1d-7) ? 1.0d0 : 0.0d0; +} + +export void result(uniform float RET[]) { + RET[programIndex] = 1.0d0; +} diff --git a/tests/test-148.ispc b/tests/test-148.ispc new file mode 100644 index 00000000..f8284e1a --- /dev/null +++ b/tests/test-148.ispc @@ -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; +}