\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\begin{array}{l}
\mathbf{if}\;x \le 2.20761997366181834 \cdot 10^{-298} \lor \neg \left(x \le 1.374279956057484 \cdot 10^{-254}\right):\\
\;\;\;\;\frac{1}{\frac{x + 1}{\mathsf{fma}\left(y, \frac{z}{t \cdot z - x}, x\right)}} - \frac{\frac{x}{t \cdot z - x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}double f(double x, double y, double z, double t) {
double r663645 = x;
double r663646 = y;
double r663647 = z;
double r663648 = r663646 * r663647;
double r663649 = r663648 - r663645;
double r663650 = t;
double r663651 = r663650 * r663647;
double r663652 = r663651 - r663645;
double r663653 = r663649 / r663652;
double r663654 = r663645 + r663653;
double r663655 = 1.0;
double r663656 = r663645 + r663655;
double r663657 = r663654 / r663656;
return r663657;
}
double f(double x, double y, double z, double t) {
double r663658 = x;
double r663659 = 2.2076199736618183e-298;
bool r663660 = r663658 <= r663659;
double r663661 = 1.3742799560574841e-254;
bool r663662 = r663658 <= r663661;
double r663663 = !r663662;
bool r663664 = r663660 || r663663;
double r663665 = 1.0;
double r663666 = 1.0;
double r663667 = r663658 + r663666;
double r663668 = y;
double r663669 = z;
double r663670 = t;
double r663671 = r663670 * r663669;
double r663672 = r663671 - r663658;
double r663673 = r663669 / r663672;
double r663674 = fma(r663668, r663673, r663658);
double r663675 = r663667 / r663674;
double r663676 = r663665 / r663675;
double r663677 = r663658 / r663672;
double r663678 = r663677 / r663667;
double r663679 = r663676 - r663678;
double r663680 = r663668 / r663670;
double r663681 = r663658 + r663680;
double r663682 = r663681 / r663667;
double r663683 = r663664 ? r663679 : r663682;
return r663683;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 7.0 |
|---|---|
| Target | 0.4 |
| Herbie | 2.5 |
if x < 2.2076199736618183e-298 or 1.3742799560574841e-254 < x Initial program 6.9
rmApplied div-sub6.9
Applied associate-+r-6.9
Applied div-sub6.9
rmApplied *-un-lft-identity6.9
Applied times-frac2.1
Simplified2.1
rmApplied clear-num2.1
Simplified2.1
if 2.2076199736618183e-298 < x < 1.3742799560574841e-254Initial program 10.8
Taylor expanded around inf 14.9
Final simplification2.5
herbie shell --seed 2020047 +o rules:numerics
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1)))