Enable more advanced CTS tests.

Add the possibility to make the generated random values for one argument
be dependent on another one.  Add the possibility to add precision limits.
Change the way precision of results is verified.

This is a redo of the mess that's CL 84333 and 84332

Change-Id: I6c59ee4588627540b5bf1952adaf70b061ccc025
diff --git a/driver/runtime/rs_cl.c b/driver/runtime/rs_cl.c
index 3a9252a..d054bcf 100644
--- a/driver/runtime/rs_cl.c
+++ b/driver/runtime/rs_cl.c
@@ -515,9 +515,10 @@
 extern float __attribute__((overloadable)) pown(float v, int p) {
     /* The mantissa of a float has fewer bits than an int (24 effective vs. 31).
      * For very large ints, we'll lose whether the exponent is even or odd, making
-     * the selection of a correct sign incorrect.  We correct this.
+     * the selection of a correct sign incorrect.  We correct this.  Use copysign
+     * to handle the negative zero case.
      */
-    float sign = (v < 0.0f && (p & 0x1)) ? -1.0 : 1.0;
+    float sign = (p & 0x1) ? copysign(1.f, v) : 1.f;
     float f = pow(v, (float)p);
     return copysign(f, sign);
 }