\frac{x - y}{z - y}\frac{1}{\frac{z - y}{x}} - \frac{y}{z - y}double f(double x, double y, double z) {
double r573128 = x;
double r573129 = y;
double r573130 = r573128 - r573129;
double r573131 = z;
double r573132 = r573131 - r573129;
double r573133 = r573130 / r573132;
return r573133;
}
double f(double x, double y, double z) {
double r573134 = 1.0;
double r573135 = z;
double r573136 = y;
double r573137 = r573135 - r573136;
double r573138 = x;
double r573139 = r573137 / r573138;
double r573140 = r573134 / r573139;
double r573141 = r573136 / r573137;
double r573142 = r573140 - r573141;
return r573142;
}




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.2
Final simplification0.2
herbie shell --seed 2020021 +o rules:numerics
(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)))