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




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 10.4 |
|---|---|
| Target | 0.0 |
| Herbie | 0.2 |
Initial program Error: 10.4 bits
SimplifiedError: 3.3 bits
rmApplied clear-numError: 3.3 bits
rmApplied div-invError: 3.3 bits
Applied add-cube-cbrtError: 3.3 bits
Applied times-fracError: 3.3 bits
Applied associate-*r*Error: 0.2 bits
SimplifiedError: 0.2 bits
Final simplificationError: 0.2 bits
herbie shell --seed 2020200
(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))