\frac{x - y}{z - y}\frac{1}{z - y} \cdot \left(x - y\right)double f(double x, double y, double z) {
double r423582 = x;
double r423583 = y;
double r423584 = r423582 - r423583;
double r423585 = z;
double r423586 = r423585 - r423583;
double r423587 = r423584 / r423586;
return r423587;
}
double f(double x, double y, double z) {
double r423588 = 1.0;
double r423589 = z;
double r423590 = y;
double r423591 = r423589 - r423590;
double r423592 = r423588 / r423591;
double r423593 = x;
double r423594 = r423593 - r423590;
double r423595 = r423592 * r423594;
return r423595;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.2 |
Initial program 0.0
rmApplied div-sub0.0
rmApplied clear-num0.3
Final simplification0.2
herbie shell --seed 2019298
(FPCore (x y z)
:name "Graphics.Rasterific.Shading:$sgradientColorAt from Rasterific-0.6.1"
:precision binary64
:herbie-target
(- (/ x (- z y)) (/ y (- z y)))
(/ (- x y) (- z y)))