\frac{x - y}{z - y}\frac{1}{\frac{z - y}{x}} - \frac{y}{z - y}double f(double x, double y, double z) {
double r432509 = x;
double r432510 = y;
double r432511 = r432509 - r432510;
double r432512 = z;
double r432513 = r432512 - r432510;
double r432514 = r432511 / r432513;
return r432514;
}
double f(double x, double y, double z) {
double r432515 = 1.0;
double r432516 = z;
double r432517 = y;
double r432518 = r432516 - r432517;
double r432519 = x;
double r432520 = r432518 / r432519;
double r432521 = r432515 / r432520;
double r432522 = r432517 / r432518;
double r432523 = r432521 - r432522;
return r432523;
}




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