x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
\left(x \cdot x + -4 \cdot \left(z \cdot \left(z \cdot y\right)\right)\right) + \left(y \cdot 4\right) \cdot \left(\sqrt[3]{t} \cdot \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right)\right)(FPCore (x y z t) :precision binary64 (- (* x x) (* (* y 4.0) (- (* z z) t))))
(FPCore (x y z t) :precision binary64 (+ (+ (* x x) (* -4.0 (* z (* z y)))) (* (* y 4.0) (* (cbrt t) (* (cbrt t) (cbrt t))))))
double code(double x, double y, double z, double t) {
return (x * x) - ((y * 4.0) * ((z * z) - t));
}
double code(double x, double y, double z, double t) {
return ((x * x) + (-4.0 * (z * (z * y)))) + ((y * 4.0) * (cbrt(t) * (cbrt(t) * cbrt(t))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.0 |
|---|---|
| Target | 5.9 |
| Herbie | 0.6 |
Initial program 6.0
rmApplied add-cube-cbrt_binary64_178456.5
Applied cancel-sign-sub-inv_binary64_177766.5
Applied distribute-rgt-in_binary64_177606.5
Applied associate--r+_binary64_177466.5
Simplified6.5
rmApplied associate-*r*_binary64_177500.6
Simplified0.6
Final simplification0.6
herbie shell --seed 2021014
(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))))