\frac{x - y}{z - y}\frac{1}{\frac{z - y}{x}} - \frac{y}{z - y}double f(double x, double y, double z) {
double r639011 = x;
double r639012 = y;
double r639013 = r639011 - r639012;
double r639014 = z;
double r639015 = r639014 - r639012;
double r639016 = r639013 / r639015;
return r639016;
}
double f(double x, double y, double z) {
double r639017 = 1.0;
double r639018 = z;
double r639019 = y;
double r639020 = r639018 - r639019;
double r639021 = x;
double r639022 = r639020 / r639021;
double r639023 = r639017 / r639022;
double r639024 = r639019 / r639020;
double r639025 = r639023 - r639024;
return r639025;
}




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
(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)))