\frac{x \cdot 2}{y \cdot z - t \cdot z}\begin{array}{l}
\mathbf{if}\;x \le -2.0397032106121382 \cdot 10^{-57} \lor \neg \left(x \le 4.5645374866027015 \cdot 10^{-88}\right):\\
\;\;\;\;\frac{\sqrt{1}}{1} \cdot \frac{\frac{x}{\frac{y - t}{2}}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z}}{y - t} \cdot \frac{\sqrt[3]{x}}{\frac{1}{2}}\\
\end{array}double f(double x, double y, double z, double t) {
double r470455 = x;
double r470456 = 2.0;
double r470457 = r470455 * r470456;
double r470458 = y;
double r470459 = z;
double r470460 = r470458 * r470459;
double r470461 = t;
double r470462 = r470461 * r470459;
double r470463 = r470460 - r470462;
double r470464 = r470457 / r470463;
return r470464;
}
double f(double x, double y, double z, double t) {
double r470465 = x;
double r470466 = -2.0397032106121382e-57;
bool r470467 = r470465 <= r470466;
double r470468 = 4.5645374866027015e-88;
bool r470469 = r470465 <= r470468;
double r470470 = !r470469;
bool r470471 = r470467 || r470470;
double r470472 = 1.0;
double r470473 = sqrt(r470472);
double r470474 = r470473 / r470472;
double r470475 = y;
double r470476 = t;
double r470477 = r470475 - r470476;
double r470478 = 2.0;
double r470479 = r470477 / r470478;
double r470480 = r470465 / r470479;
double r470481 = z;
double r470482 = r470480 / r470481;
double r470483 = r470474 * r470482;
double r470484 = cbrt(r470465);
double r470485 = r470484 * r470484;
double r470486 = r470485 / r470481;
double r470487 = r470486 / r470477;
double r470488 = r470472 / r470478;
double r470489 = r470484 / r470488;
double r470490 = r470487 * r470489;
double r470491 = r470471 ? r470483 : r470490;
return r470491;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.8 |
|---|---|
| Target | 2.3 |
| Herbie | 2.2 |
if x < -2.0397032106121382e-57 or 4.5645374866027015e-88 < x Initial program 9.0
Simplified8.1
rmApplied *-un-lft-identity8.1
Applied times-frac8.1
Applied *-un-lft-identity8.1
Applied times-frac2.5
Simplified2.5
rmApplied *-un-lft-identity2.5
Applied add-sqr-sqrt2.5
Applied times-frac2.5
Applied associate-*l*2.5
Simplified2.4
if -2.0397032106121382e-57 < x < 4.5645374866027015e-88Initial program 3.6
Simplified2.2
rmApplied *-un-lft-identity2.2
Applied times-frac2.2
Applied *-un-lft-identity2.2
Applied times-frac9.3
Simplified9.3
rmApplied div-inv9.3
Applied add-cube-cbrt9.7
Applied times-frac9.7
Applied associate-*r*6.4
Simplified2.0
Final simplification2.2
herbie shell --seed 2020039 +o rules:numerics
(FPCore (x y z t)
:name "Linear.Projection:infinitePerspective from linear-1.19.1.3, A"
:precision binary64
:herbie-target
(if (< (/ (* x 2) (- (* y z) (* t z))) -2.559141628295061e-13) (* (/ x (* (- y t) z)) 2) (if (< (/ (* x 2) (- (* y z) (* t z))) 1.0450278273301259e-269) (/ (* (/ x z) 2) (- y t)) (* (/ x (* (- y t) z)) 2)))
(/ (* x 2) (- (* y z) (* t z))))