\frac{x \cdot 2}{y \cdot z - t \cdot z}\begin{array}{l}
\mathbf{if}\;z \le -4.15387447039997915 \cdot 10^{140}:\\
\;\;\;\;\frac{\frac{x}{z}}{\frac{y - t}{2}}\\
\mathbf{elif}\;z \le 1.85210845097292845 \cdot 10^{55}:\\
\;\;\;\;\frac{x}{\left(y - t\right) \cdot z} \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1} \cdot \frac{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\frac{1}{\sqrt{2}}}}{\frac{z}{\frac{\sqrt[3]{x}}{\frac{y - t}{\sqrt{2}}}}}\\
\end{array}double f(double x, double y, double z, double t) {
double r540575 = x;
double r540576 = 2.0;
double r540577 = r540575 * r540576;
double r540578 = y;
double r540579 = z;
double r540580 = r540578 * r540579;
double r540581 = t;
double r540582 = r540581 * r540579;
double r540583 = r540580 - r540582;
double r540584 = r540577 / r540583;
return r540584;
}
double f(double x, double y, double z, double t) {
double r540585 = z;
double r540586 = -4.153874470399979e+140;
bool r540587 = r540585 <= r540586;
double r540588 = x;
double r540589 = r540588 / r540585;
double r540590 = y;
double r540591 = t;
double r540592 = r540590 - r540591;
double r540593 = 2.0;
double r540594 = r540592 / r540593;
double r540595 = r540589 / r540594;
double r540596 = 1.8521084509729285e+55;
bool r540597 = r540585 <= r540596;
double r540598 = r540592 * r540585;
double r540599 = r540588 / r540598;
double r540600 = r540599 * r540593;
double r540601 = 1.0;
double r540602 = r540601 / r540601;
double r540603 = cbrt(r540588);
double r540604 = r540603 * r540603;
double r540605 = sqrt(r540593);
double r540606 = r540601 / r540605;
double r540607 = r540604 / r540606;
double r540608 = r540592 / r540605;
double r540609 = r540603 / r540608;
double r540610 = r540585 / r540609;
double r540611 = r540607 / r540610;
double r540612 = r540602 * r540611;
double r540613 = r540597 ? r540600 : r540612;
double r540614 = r540587 ? r540595 : r540613;
return r540614;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.6 |
|---|---|
| Target | 2.0 |
| Herbie | 3.4 |
if z < -4.153874470399979e+140Initial program 14.1
Simplified10.2
rmApplied *-un-lft-identity10.2
Applied times-frac10.2
Applied associate-/r*2.1
Simplified2.1
if -4.153874470399979e+140 < z < 1.8521084509729285e+55Initial program 2.9
Simplified2.8
rmApplied *-un-lft-identity2.8
Applied times-frac2.8
Applied *-un-lft-identity2.8
Applied times-frac7.2
Simplified7.2
rmApplied associate-/r/7.3
Applied associate-*r*7.3
Simplified2.8
if 1.8521084509729285e+55 < z Initial program 12.1
Simplified9.8
rmApplied *-un-lft-identity9.8
Applied times-frac9.8
Applied *-un-lft-identity9.8
Applied times-frac2.6
Simplified2.6
rmApplied *-un-lft-identity2.6
Applied *-un-lft-identity2.6
Applied times-frac2.6
Applied associate-*l*2.6
Simplified2.5
rmApplied add-sqr-sqrt3.0
Applied *-un-lft-identity3.0
Applied times-frac2.9
Applied add-cube-cbrt3.1
Applied times-frac3.1
Applied associate-/l*6.1
Final simplification3.4
herbie shell --seed 2020018
(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))))