\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 r729162 = x;
double r729163 = y;
double r729164 = r729162 - r729163;
double r729165 = z;
double r729166 = r729165 - r729163;
double r729167 = r729164 / r729166;
return r729167;
}
double f(double x, double y, double z) {
double r729168 = x;
double r729169 = z;
double r729170 = y;
double r729171 = r729169 - r729170;
double r729172 = r729168 / r729171;
double r729173 = r729170 / r729171;
double r729174 = expm1(r729173);
double r729175 = log1p(r729174);
double r729176 = r729172 - r729175;
return r729176;
}




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