\frac{x + y \cdot \left(z - x\right)}{z}\frac{x}{z} \cdot \left(1 - y\right) + ydouble f(double x, double y, double z) {
double r616979 = x;
double r616980 = y;
double r616981 = z;
double r616982 = r616981 - r616979;
double r616983 = r616980 * r616982;
double r616984 = r616979 + r616983;
double r616985 = r616984 / r616981;
return r616985;
}
double f(double x, double y, double z) {
double r616986 = x;
double r616987 = z;
double r616988 = r616986 / r616987;
double r616989 = 1.0;
double r616990 = y;
double r616991 = r616989 - r616990;
double r616992 = r616988 * r616991;
double r616993 = r616992 + r616990;
return r616993;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 10.2 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 10.2
Simplified3.5
rmApplied clear-num3.6
rmApplied div-inv3.6
Applied add-cube-cbrt3.6
Applied times-frac3.6
Simplified3.6
Simplified3.6
rmApplied sub-neg3.6
Applied distribute-lft-in3.6
Simplified3.5
Simplified0.0
Taylor expanded around 0 3.5
Simplified0.0
Final simplification0.0
herbie shell --seed 2019195
(FPCore (x y z)
:name "Diagrams.Backend.Rasterific:rasterificRadialGradient from diagrams-rasterific-1.3.1.3"
:herbie-target
(- (+ y (/ x z)) (/ y (/ z x)))
(/ (+ x (* y (- z x))) z))