\frac{x + y \cdot \left(z - x\right)}{z}\left(1 - y\right) \cdot \frac{x}{z} + ydouble code(double x, double y, double z) {
return ((x + (y * (z - x))) / z);
}
double code(double x, double y, double z) {
return (((1.0 - y) * (x / z)) + y);
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 10.1 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 10.1
Simplified0.0
rmApplied fma-udef0.0
Final simplification0.0
herbie shell --seed 2020105 +o rules:numerics
(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))