\frac{x - y}{z - y}\mathsf{fma}\left(x, \frac{1}{z - y}, -\frac{y}{z - y}\right)double f(double x, double y, double z) {
double r654783 = x;
double r654784 = y;
double r654785 = r654783 - r654784;
double r654786 = z;
double r654787 = r654786 - r654784;
double r654788 = r654785 / r654787;
return r654788;
}
double f(double x, double y, double z) {
double r654789 = x;
double r654790 = 1.0;
double r654791 = z;
double r654792 = y;
double r654793 = r654791 - r654792;
double r654794 = r654790 / r654793;
double r654795 = r654792 / r654793;
double r654796 = -r654795;
double r654797 = fma(r654789, r654794, r654796);
return r654797;
}




Bits error versus x




Bits error versus y




Bits error versus z
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.1 |
Initial program 0.0
rmApplied div-sub0.0
rmApplied div-inv0.1
Applied fma-neg0.1
Final simplification0.1
herbie shell --seed 2020062 +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)))