\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -5.38482551233063052 \cdot 10^{-225}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{1}{\frac{a - t}{z - t}}\right)\\
\mathbf{elif}\;a \le 1.36251296932317456 \cdot 10^{-123}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \left(z - t\right) \cdot \frac{1}{a - t}\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r722134 = x;
double r722135 = y;
double r722136 = r722134 + r722135;
double r722137 = z;
double r722138 = t;
double r722139 = r722137 - r722138;
double r722140 = r722139 * r722135;
double r722141 = a;
double r722142 = r722141 - r722138;
double r722143 = r722140 / r722142;
double r722144 = r722136 - r722143;
return r722144;
}
double f(double x, double y, double z, double t, double a) {
double r722145 = a;
double r722146 = -5.3848255123306305e-225;
bool r722147 = r722145 <= r722146;
double r722148 = x;
double r722149 = y;
double r722150 = 1.0;
double r722151 = t;
double r722152 = r722145 - r722151;
double r722153 = z;
double r722154 = r722153 - r722151;
double r722155 = r722152 / r722154;
double r722156 = r722150 / r722155;
double r722157 = r722150 - r722156;
double r722158 = r722149 * r722157;
double r722159 = r722148 + r722158;
double r722160 = 1.3625129693231746e-123;
bool r722161 = r722145 <= r722160;
double r722162 = r722153 / r722151;
double r722163 = r722149 * r722162;
double r722164 = r722148 + r722163;
double r722165 = r722150 / r722152;
double r722166 = r722154 * r722165;
double r722167 = r722150 - r722166;
double r722168 = r722149 * r722167;
double r722169 = r722148 + r722168;
double r722170 = r722161 ? r722164 : r722169;
double r722171 = r722147 ? r722159 : r722170;
return r722171;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 17.0 |
|---|---|
| Target | 8.5 |
| Herbie | 7.0 |
if a < -5.3848255123306305e-225Initial program 16.3
rmApplied associate-/l*10.8
rmApplied div-inv10.8
Applied associate-/r*10.6
rmApplied associate--l+7.8
Simplified7.1
rmApplied clear-num7.1
if -5.3848255123306305e-225 < a < 1.3625129693231746e-123Initial program 20.6
rmApplied associate-/l*19.6
rmApplied div-inv19.6
Applied associate-/r*20.1
rmApplied associate--l+13.0
Simplified11.6
Taylor expanded around inf 8.2
if 1.3625129693231746e-123 < a Initial program 15.9
rmApplied associate-/l*9.2
rmApplied div-inv9.2
Applied associate-/r*8.6
rmApplied associate--l+6.1
Simplified5.6
rmApplied div-inv6.2
Final simplification7.0
herbie shell --seed 2020036
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-07) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))