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) (y + ((double) (((double) (x / z)) * ((double) (1.0 - y))))));
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 10.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 10.0
Simplified3.6
rmApplied add-cube-cbrt4.2
Applied *-un-lft-identity4.2
Applied times-frac4.2
Applied associate-*r*1.4
Simplified1.4
rmApplied pow11.4
Applied pow11.4
Applied pow-prod-down1.4
Simplified0.0
Final simplification0.0
herbie shell --seed 2020192
(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))