\frac{x \cdot 2}{y \cdot z - t \cdot z}\begin{array}{l}
\mathbf{if}\;z \le -6.233745507656147839026965742862561565412 \cdot 10^{81}:\\
\;\;\;\;\frac{\frac{2 \cdot x}{z}}{y - t}\\
\mathbf{elif}\;z \le 2629606188374439057894428064142589952:\\
\;\;\;\;\frac{x \cdot 2}{z \cdot \left(y - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\sqrt[3]{\frac{1}{z}} \cdot \sqrt[3]{\frac{1}{z}}\right) \cdot \frac{2 \cdot x}{\sqrt[3]{y - t} \cdot \sqrt[3]{y - t}}\right) \cdot \frac{\sqrt[3]{\frac{\sqrt[3]{1}}{z}}}{\sqrt[3]{y - t}}\\
\end{array}double f(double x, double y, double z, double t) {
double r434478 = x;
double r434479 = 2.0;
double r434480 = r434478 * r434479;
double r434481 = y;
double r434482 = z;
double r434483 = r434481 * r434482;
double r434484 = t;
double r434485 = r434484 * r434482;
double r434486 = r434483 - r434485;
double r434487 = r434480 / r434486;
return r434487;
}
double f(double x, double y, double z, double t) {
double r434488 = z;
double r434489 = -6.233745507656148e+81;
bool r434490 = r434488 <= r434489;
double r434491 = 2.0;
double r434492 = x;
double r434493 = r434491 * r434492;
double r434494 = r434493 / r434488;
double r434495 = y;
double r434496 = t;
double r434497 = r434495 - r434496;
double r434498 = r434494 / r434497;
double r434499 = 2.629606188374439e+36;
bool r434500 = r434488 <= r434499;
double r434501 = r434492 * r434491;
double r434502 = r434488 * r434497;
double r434503 = r434501 / r434502;
double r434504 = 1.0;
double r434505 = r434504 / r434488;
double r434506 = cbrt(r434505);
double r434507 = r434506 * r434506;
double r434508 = cbrt(r434497);
double r434509 = r434508 * r434508;
double r434510 = r434493 / r434509;
double r434511 = r434507 * r434510;
double r434512 = cbrt(r434504);
double r434513 = r434512 / r434488;
double r434514 = cbrt(r434513);
double r434515 = r434514 / r434508;
double r434516 = r434511 * r434515;
double r434517 = r434500 ? r434503 : r434516;
double r434518 = r434490 ? r434498 : r434517;
return r434518;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.8 |
|---|---|
| Target | 2.0 |
| Herbie | 2.3 |
if z < -6.233745507656148e+81Initial program 12.7
Simplified9.8
rmApplied div-inv9.8
rmApplied associate-/r*9.4
rmApplied pow19.4
Applied pow19.4
Applied pow19.4
Applied pow-prod-down9.4
Applied pow-prod-down9.4
Simplified2.0
if -6.233745507656148e+81 < z < 2.629606188374439e+36Initial program 2.4
Simplified2.4
if 2.629606188374439e+36 < z Initial program 12.0
Simplified9.8
rmApplied div-inv9.9
rmApplied associate-/r*9.3
rmApplied add-cube-cbrt9.7
Applied *-un-lft-identity9.7
Applied add-cube-cbrt9.7
Applied times-frac9.7
Applied times-frac9.7
Applied associate-*r*3.6
Simplified3.6
rmApplied *-un-lft-identity3.6
Applied cbrt-prod3.6
Applied add-cube-cbrt3.8
Applied times-frac3.8
Applied associate-*r*2.1
Simplified2.1
Final simplification2.3
herbie shell --seed 2019351 +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))))