Average Error: 24.4 → 5.7
Time: 19.4s
Precision: 64
\[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
\[\begin{array}{l} \mathbf{if}\;z \le -1.247998335336759758701020951372634983578 \cdot 10^{154}:\\ \;\;\;\;-x \cdot y\\ \mathbf{elif}\;z \le 1.646281250791699550996089440074228287346 \cdot 10^{140}:\\ \;\;\;\;x \cdot \left(\frac{y}{\frac{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}{\sqrt[3]{z}}} \cdot \frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}} \cdot \sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array}\]
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\begin{array}{l}
\mathbf{if}\;z \le -1.247998335336759758701020951372634983578 \cdot 10^{154}:\\
\;\;\;\;-x \cdot y\\

\mathbf{elif}\;z \le 1.646281250791699550996089440074228287346 \cdot 10^{140}:\\
\;\;\;\;x \cdot \left(\frac{y}{\frac{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}{\sqrt[3]{z}}} \cdot \frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}} \cdot \sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot y\\

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r17203638 = x;
        double r17203639 = y;
        double r17203640 = r17203638 * r17203639;
        double r17203641 = z;
        double r17203642 = r17203640 * r17203641;
        double r17203643 = r17203641 * r17203641;
        double r17203644 = t;
        double r17203645 = a;
        double r17203646 = r17203644 * r17203645;
        double r17203647 = r17203643 - r17203646;
        double r17203648 = sqrt(r17203647);
        double r17203649 = r17203642 / r17203648;
        return r17203649;
}

double f(double x, double y, double z, double t, double a) {
        double r17203650 = z;
        double r17203651 = -1.2479983353367598e+154;
        bool r17203652 = r17203650 <= r17203651;
        double r17203653 = x;
        double r17203654 = y;
        double r17203655 = r17203653 * r17203654;
        double r17203656 = -r17203655;
        double r17203657 = 1.6462812507916996e+140;
        bool r17203658 = r17203650 <= r17203657;
        double r17203659 = r17203650 * r17203650;
        double r17203660 = a;
        double r17203661 = t;
        double r17203662 = r17203660 * r17203661;
        double r17203663 = r17203659 - r17203662;
        double r17203664 = sqrt(r17203663);
        double r17203665 = cbrt(r17203664);
        double r17203666 = cbrt(r17203650);
        double r17203667 = r17203665 / r17203666;
        double r17203668 = r17203654 / r17203667;
        double r17203669 = r17203666 * r17203666;
        double r17203670 = r17203665 * r17203665;
        double r17203671 = r17203669 / r17203670;
        double r17203672 = r17203668 * r17203671;
        double r17203673 = r17203653 * r17203672;
        double r17203674 = r17203658 ? r17203673 : r17203655;
        double r17203675 = r17203652 ? r17203656 : r17203674;
        return r17203675;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original24.4
Target7.5
Herbie5.7
\[\begin{array}{l} \mathbf{if}\;z \lt -3.192130590385276419686361646843883646209 \cdot 10^{46}:\\ \;\;\;\;-y \cdot x\\ \mathbf{elif}\;z \lt 5.976268120920894210257945708950453212935 \cdot 10^{90}:\\ \;\;\;\;\frac{x \cdot z}{\frac{\sqrt{z \cdot z - a \cdot t}}{y}}\\ \mathbf{else}:\\ \;\;\;\;y \cdot x\\ \end{array}\]

Derivation

  1. Split input into 3 regimes
  2. if z < -1.2479983353367598e+154

    1. Initial program 54.1

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
    2. Using strategy rm
    3. Applied associate-/l*53.7

      \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity53.7

      \[\leadsto \frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{\color{blue}{1 \cdot z}}}\]
    6. Applied *-un-lft-identity53.7

      \[\leadsto \frac{x \cdot y}{\frac{\sqrt{\color{blue}{1 \cdot \left(z \cdot z - t \cdot a\right)}}}{1 \cdot z}}\]
    7. Applied sqrt-prod53.7

      \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{\sqrt{1} \cdot \sqrt{z \cdot z - t \cdot a}}}{1 \cdot z}}\]
    8. Applied times-frac53.7

      \[\leadsto \frac{x \cdot y}{\color{blue}{\frac{\sqrt{1}}{1} \cdot \frac{\sqrt{z \cdot z - t \cdot a}}{z}}}\]
    9. Applied times-frac53.7

      \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{1}}{1}} \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}}\]
    10. Simplified53.7

      \[\leadsto \color{blue}{x} \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\]
    11. Taylor expanded around -inf 1.5

      \[\leadsto x \cdot \color{blue}{\left(-1 \cdot y\right)}\]
    12. Simplified1.5

      \[\leadsto x \cdot \color{blue}{\left(-y\right)}\]

    if -1.2479983353367598e+154 < z < 1.6462812507916996e+140

    1. Initial program 10.9

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
    2. Using strategy rm
    3. Applied associate-/l*8.7

      \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}}\]
    4. Using strategy rm
    5. Applied *-un-lft-identity8.7

      \[\leadsto \frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{\color{blue}{1 \cdot z}}}\]
    6. Applied *-un-lft-identity8.7

      \[\leadsto \frac{x \cdot y}{\frac{\sqrt{\color{blue}{1 \cdot \left(z \cdot z - t \cdot a\right)}}}{1 \cdot z}}\]
    7. Applied sqrt-prod8.7

      \[\leadsto \frac{x \cdot y}{\frac{\color{blue}{\sqrt{1} \cdot \sqrt{z \cdot z - t \cdot a}}}{1 \cdot z}}\]
    8. Applied times-frac8.7

      \[\leadsto \frac{x \cdot y}{\color{blue}{\frac{\sqrt{1}}{1} \cdot \frac{\sqrt{z \cdot z - t \cdot a}}{z}}}\]
    9. Applied times-frac8.3

      \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt{1}}{1}} \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}}\]
    10. Simplified8.3

      \[\leadsto \color{blue}{x} \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}\]
    11. Using strategy rm
    12. Applied add-cube-cbrt9.0

      \[\leadsto x \cdot \frac{y}{\frac{\sqrt{z \cdot z - t \cdot a}}{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}}}\]
    13. Applied add-cube-cbrt8.6

      \[\leadsto x \cdot \frac{y}{\frac{\color{blue}{\left(\sqrt[3]{\sqrt{z \cdot z - t \cdot a}} \cdot \sqrt[3]{\sqrt{z \cdot z - t \cdot a}}\right) \cdot \sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}}\]
    14. Applied times-frac8.6

      \[\leadsto x \cdot \frac{y}{\color{blue}{\frac{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}} \cdot \sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z}}}}\]
    15. Applied *-un-lft-identity8.6

      \[\leadsto x \cdot \frac{\color{blue}{1 \cdot y}}{\frac{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}} \cdot \sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z}}}\]
    16. Applied times-frac7.7

      \[\leadsto x \cdot \color{blue}{\left(\frac{1}{\frac{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}} \cdot \sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}} \cdot \frac{y}{\frac{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z}}}\right)}\]
    17. Simplified7.7

      \[\leadsto x \cdot \left(\color{blue}{\frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}} \cdot \sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}} \cdot \frac{y}{\frac{\sqrt[3]{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z}}}\right)\]

    if 1.6462812507916996e+140 < z

    1. Initial program 51.9

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
    2. Taylor expanded around inf 1.4

      \[\leadsto \color{blue}{x \cdot y}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification5.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -1.247998335336759758701020951372634983578 \cdot 10^{154}:\\ \;\;\;\;-x \cdot y\\ \mathbf{elif}\;z \le 1.646281250791699550996089440074228287346 \cdot 10^{140}:\\ \;\;\;\;x \cdot \left(\frac{y}{\frac{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}{\sqrt[3]{z}}} \cdot \frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{\sqrt[3]{\sqrt{z \cdot z - a \cdot t}} \cdot \sqrt[3]{\sqrt{z \cdot z - a \cdot t}}}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array}\]

Reproduce

herbie shell --seed 2019170 
(FPCore (x y z t a)
  :name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"

  :herbie-target
  (if (< z -3.1921305903852764e+46) (- (* y x)) (if (< z 5.976268120920894e+90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))

  (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))