Average Error: 24.3 → 5.9
Time: 17.7s
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.600257058432804334868295655130597155484 \cdot 10^{108}:\\ \;\;\;\;-x \cdot y\\ \mathbf{elif}\;z \le 2.112792157625963034500419357066115959074 \cdot 10^{83}:\\ \;\;\;\;\frac{1}{\frac{\sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}}{\sqrt[3]{y} \cdot \sqrt[3]{y}}} \cdot \left(\frac{x}{\frac{\sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}}{\sqrt[3]{y}}} \cdot \frac{z}{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}\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.600257058432804334868295655130597155484 \cdot 10^{108}:\\
\;\;\;\;-x \cdot y\\

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

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r212769 = x;
        double r212770 = y;
        double r212771 = r212769 * r212770;
        double r212772 = z;
        double r212773 = r212771 * r212772;
        double r212774 = r212772 * r212772;
        double r212775 = t;
        double r212776 = a;
        double r212777 = r212775 * r212776;
        double r212778 = r212774 - r212777;
        double r212779 = sqrt(r212778);
        double r212780 = r212773 / r212779;
        return r212780;
}

double f(double x, double y, double z, double t, double a) {
        double r212781 = z;
        double r212782 = -1.6002570584328043e+108;
        bool r212783 = r212781 <= r212782;
        double r212784 = x;
        double r212785 = y;
        double r212786 = r212784 * r212785;
        double r212787 = -r212786;
        double r212788 = 2.112792157625963e+83;
        bool r212789 = r212781 <= r212788;
        double r212790 = 1.0;
        double r212791 = r212781 * r212781;
        double r212792 = t;
        double r212793 = a;
        double r212794 = r212792 * r212793;
        double r212795 = r212791 - r212794;
        double r212796 = cbrt(r212795);
        double r212797 = fabs(r212796);
        double r212798 = sqrt(r212797);
        double r212799 = cbrt(r212785);
        double r212800 = r212799 * r212799;
        double r212801 = r212798 / r212800;
        double r212802 = r212790 / r212801;
        double r212803 = r212798 / r212799;
        double r212804 = r212784 / r212803;
        double r212805 = sqrt(r212796);
        double r212806 = r212781 / r212805;
        double r212807 = r212804 * r212806;
        double r212808 = r212802 * r212807;
        double r212809 = r212789 ? r212808 : r212786;
        double r212810 = r212783 ? r212787 : r212809;
        return r212810;
}

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.3
Target7.4
Herbie5.9
\[\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.6002570584328043e+108

    1. Initial program 46.3

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity46.3

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{1}} \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}}\]
    6. Simplified44.2

      \[\leadsto \color{blue}{\left(x \cdot y\right)} \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\]
    7. Taylor expanded around -inf 2.1

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

    if -1.6002570584328043e+108 < z < 2.112792157625963e+83

    1. Initial program 10.4

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt10.8

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{\sqrt[3]{z \cdot z - t \cdot a} \cdot \sqrt[3]{z \cdot z - t \cdot a}}} \cdot \frac{z}{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}}\]
    6. Simplified10.7

      \[\leadsto \color{blue}{\frac{x}{\frac{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}{y}}} \cdot \frac{z}{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}\]
    7. Using strategy rm
    8. Applied add-cube-cbrt11.0

      \[\leadsto \frac{x}{\frac{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}} \cdot \frac{z}{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}\]
    9. Applied add-sqr-sqrt11.1

      \[\leadsto \frac{x}{\frac{\color{blue}{\sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|} \cdot \sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}}}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}} \cdot \frac{z}{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}\]
    10. Applied times-frac11.1

      \[\leadsto \frac{x}{\color{blue}{\frac{\sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \frac{\sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}}{\sqrt[3]{y}}}} \cdot \frac{z}{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}\]
    11. Applied *-un-lft-identity11.1

      \[\leadsto \frac{\color{blue}{1 \cdot x}}{\frac{\sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \frac{\sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}}{\sqrt[3]{y}}} \cdot \frac{z}{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}\]
    12. Applied times-frac9.9

      \[\leadsto \color{blue}{\left(\frac{1}{\frac{\sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}}{\sqrt[3]{y} \cdot \sqrt[3]{y}}} \cdot \frac{x}{\frac{\sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}}{\sqrt[3]{y}}}\right)} \cdot \frac{z}{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}\]
    13. Applied associate-*l*8.3

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

    if 2.112792157625963e+83 < z

    1. Initial program 40.7

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity40.7

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

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\sqrt{1}} \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}}\]
    6. Simplified38.0

      \[\leadsto \color{blue}{\left(x \cdot y\right)} \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\]
    7. Taylor expanded around inf 2.9

      \[\leadsto \left(x \cdot y\right) \cdot \color{blue}{1}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification5.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -1.600257058432804334868295655130597155484 \cdot 10^{108}:\\ \;\;\;\;-x \cdot y\\ \mathbf{elif}\;z \le 2.112792157625963034500419357066115959074 \cdot 10^{83}:\\ \;\;\;\;\frac{1}{\frac{\sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}}{\sqrt[3]{y} \cdot \sqrt[3]{y}}} \cdot \left(\frac{x}{\frac{\sqrt{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}}{\sqrt[3]{y}}} \cdot \frac{z}{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot y\\ \end{array}\]

Reproduce

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

  :herbie-target
  (if (< z -3.1921305903852764e46) (- (* y x)) (if (< z 5.9762681209208942e90) (/ (* x z) (/ (sqrt (- (* z z) (* a t))) y)) (* y x)))

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