x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 1.482907119070825 \cdot 10^{+293}:\\
\;\;\;\;x \cdot x + \left(y \cdot 4\right) \cdot \left(t - z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + \left(y \cdot \left(4 \cdot \left(z + \sqrt{t}\right)\right)\right) \cdot \left(\sqrt{t} - z\right)\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (x * x)) - ((double) (((double) (y * 4.0)) * ((double) (((double) (z * z)) - t))))));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((((double) (z * z)) <= 1.482907119070825e+293)) {
VAR = ((double) (((double) (x * x)) + ((double) (((double) (y * 4.0)) * ((double) (t - ((double) (z * z))))))));
} else {
VAR = ((double) (((double) (x * x)) + ((double) (((double) (y * ((double) (4.0 * ((double) (z + ((double) sqrt(t)))))))) * ((double) (((double) sqrt(t)) - z))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.4 |
|---|---|
| Target | 6.4 |
| Herbie | 3.5 |
if (* z z) < 1.48290711907082506e293Initial program Error: 0.1 bits
if 1.48290711907082506e293 < (* z z) Initial program Error: 58.0 bits
rmApplied add-sqr-sqrtError: 61.0 bits
Applied difference-of-squaresError: 61.0 bits
Applied associate-*r*Error: 31.7 bits
SimplifiedError: 31.7 bits
Final simplificationError: 3.5 bits
herbie shell --seed 2020200
(FPCore (x y z t)
:name "Graphics.Rasterific.Shading:$sradialGradientWithFocusShader from Rasterific-0.6.1, B"
:precision binary64
:herbie-target
(- (* x x) (* 4.0 (* y (- (* z z) t))))
(- (* x x) (* (* y 4.0) (- (* z z) t))))