\frac{x - y}{z - y}\frac{x}{z - y} - \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{y}{z - y}\right)\right)double f(double x, double y, double z) {
double r693796 = x;
double r693797 = y;
double r693798 = r693796 - r693797;
double r693799 = z;
double r693800 = r693799 - r693797;
double r693801 = r693798 / r693800;
return r693801;
}
double f(double x, double y, double z) {
double r693802 = x;
double r693803 = z;
double r693804 = y;
double r693805 = r693803 - r693804;
double r693806 = r693802 / r693805;
double r693807 = r693804 / r693805;
double r693808 = expm1(r693807);
double r693809 = log1p(r693808);
double r693810 = r693806 - r693809;
return r693810;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied div-sub0.0
rmApplied log1p-expm1-u0.0
Final simplification0.0
herbie shell --seed 2020042 +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)))