x + \frac{y \cdot \left(z - t\right)}{z - a}x + y \cdot \frac{z - t}{z - a}double f(double x, double y, double z, double t, double a) {
double r369220 = x;
double r369221 = y;
double r369222 = z;
double r369223 = t;
double r369224 = r369222 - r369223;
double r369225 = r369221 * r369224;
double r369226 = a;
double r369227 = r369222 - r369226;
double r369228 = r369225 / r369227;
double r369229 = r369220 + r369228;
return r369229;
}
double f(double x, double y, double z, double t, double a) {
double r369230 = x;
double r369231 = y;
double r369232 = z;
double r369233 = t;
double r369234 = r369232 - r369233;
double r369235 = a;
double r369236 = r369232 - r369235;
double r369237 = r369234 / r369236;
double r369238 = r369231 * r369237;
double r369239 = r369230 + r369238;
return r369239;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 11.2 |
|---|---|
| Target | 1.1 |
| Herbie | 1.3 |
Initial program 11.2
Simplified3.0
rmApplied clear-num3.2
rmApplied fma-udef3.2
Simplified3.1
rmApplied *-un-lft-identity3.1
Applied *-un-lft-identity3.1
Applied times-frac3.1
Applied *-un-lft-identity3.1
Applied times-frac3.1
Simplified3.1
Simplified1.3
Final simplification1.3
herbie shell --seed 2019322 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))