\frac{x - y}{z - y} \cdot t
\begin{array}{l}
\mathbf{if}\;t \leq -1.1171825476782533 \cdot 10^{+25}:\\
\;\;\;\;\begin{array}{l}
t_1 := \sqrt[3]{x - y}\\
\left(t_1 \cdot t_1\right) \cdot \left(t \cdot \frac{t_1}{z - y}\right)
\end{array}\\
\mathbf{elif}\;t \leq 2.9971915677477026 \cdot 10^{-68}:\\
\;\;\;\;\frac{t \cdot x}{z - y} - \frac{t \cdot y}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{x}{z - y} - \frac{y}{z - y}\right)\\
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
(FPCore (x y z t)
:precision binary64
(if (<= t -1.1171825476782533e+25)
(let* ((t_1 (cbrt (- x y)))) (* (* t_1 t_1) (* t (/ t_1 (- z y)))))
(if (<= t 2.9971915677477026e-68)
(- (/ (* t x) (- z y)) (/ (* t y) (- z y)))
(* t (- (/ x (- z y)) (/ y (- z y)))))))double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.1171825476782533e+25) {
double t_1_1 = cbrt(x - y);
tmp = (t_1_1 * t_1_1) * (t * (t_1_1 / (z - y)));
} else if (t <= 2.9971915677477026e-68) {
tmp = ((t * x) / (z - y)) - ((t * y) / (z - y));
} else {
tmp = t * ((x / (z - y)) - (y / (z - y)));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.1 |
|---|---|
| Target | 2.0 |
| Herbie | 2.2 |
if t < -1.1171825476782533e25Initial program 2.0
Applied *-un-lft-identity_binary642.0
Applied add-cube-cbrt_binary643.2
Applied times-frac_binary643.2
Applied associate-*l*_binary643.2
Simplified3.2
if -1.1171825476782533e25 < t < 2.99719156774770259e-68Initial program 2.2
Taylor expanded in x around 0 2.0
if 2.99719156774770259e-68 < t Initial program 1.9
Taylor expanded in x around 0 1.9
Final simplification2.2
herbie shell --seed 2022068
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))