\frac{x + y \cdot \left(z - x\right)}{z}\left(\frac{x}{z} + y\right) - \frac{x}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{y}{\sqrt[3]{z}}double code(double x, double y, double z) {
return ((double) (((double) (x + ((double) (y * ((double) (z - x)))))) / z));
}
double code(double x, double y, double z) {
return ((double) (((double) (((double) (x / z)) + y)) - ((double) (((double) (x / ((double) (((double) cbrt(z)) * ((double) cbrt(z)))))) * ((double) (y / ((double) cbrt(z))))))));
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 10.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.9 |
Initial program 10.0
Taylor expanded around 0 3.3
rmApplied add-cube-cbrt3.4
Applied times-frac0.9
Final simplification0.9
herbie shell --seed 2020148
(FPCore (x y z)
:name "Diagrams.Backend.Rasterific:rasterificRadialGradient from diagrams-rasterific-1.3.1.3"
:precision binary64
:herbie-target
(- (+ y (/ x z)) (/ y (/ z x)))
(/ (+ x (* y (- z x))) z))