\frac{x + y \cdot \left(z - x\right)}{z}y - \frac{\frac{x}{z}}{\frac{1}{y - 1}}double f(double x, double y, double z) {
double r644099 = x;
double r644100 = y;
double r644101 = z;
double r644102 = r644101 - r644099;
double r644103 = r644100 * r644102;
double r644104 = r644099 + r644103;
double r644105 = r644104 / r644101;
return r644105;
}
double f(double x, double y, double z) {
double r644106 = y;
double r644107 = x;
double r644108 = z;
double r644109 = r644107 / r644108;
double r644110 = 1.0;
double r644111 = r644106 - r644110;
double r644112 = r644110 / r644111;
double r644113 = r644109 / r644112;
double r644114 = r644106 - r644113;
return r644114;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 10.1 |
|---|---|
| Target | 0.0 |
| Herbie | 0.1 |
Initial program 10.1
Taylor expanded around 0 3.6
Simplified3.6
rmApplied *-un-lft-identity3.6
Applied distribute-rgt-out--3.6
Applied associate-/l*3.0
rmApplied div-inv3.0
Applied associate-/r*0.1
Final simplification0.1
herbie shell --seed 2019350
(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))