Average Error: 24.2 → 6.0
Time: 7.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.988498731083228166829313173712614281826 \cdot 10^{94}:\\ \;\;\;\;x \cdot \left(-1 \cdot y\right)\\ \mathbf{elif}\;z \le 1.35842265879521391367228878679624768242 \cdot 10^{112}:\\ \;\;\;\;\frac{\frac{x}{\frac{\frac{\frac{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}{\sqrt[3]{z}}}{\sqrt[3]{z}}}{y}}}{\frac{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}{\sqrt[3]{z}}}\\ \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.988498731083228166829313173712614281826 \cdot 10^{94}:\\
\;\;\;\;x \cdot \left(-1 \cdot y\right)\\

\mathbf{elif}\;z \le 1.35842265879521391367228878679624768242 \cdot 10^{112}:\\
\;\;\;\;\frac{\frac{x}{\frac{\frac{\frac{\left|\sqrt[3]{z \cdot z - t \cdot a}\right|}{\sqrt[3]{z}}}{\sqrt[3]{z}}}{y}}}{\frac{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}{\sqrt[3]{z}}}\\

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

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r224930 = x;
        double r224931 = y;
        double r224932 = r224930 * r224931;
        double r224933 = z;
        double r224934 = r224932 * r224933;
        double r224935 = r224933 * r224933;
        double r224936 = t;
        double r224937 = a;
        double r224938 = r224936 * r224937;
        double r224939 = r224935 - r224938;
        double r224940 = sqrt(r224939);
        double r224941 = r224934 / r224940;
        return r224941;
}

double f(double x, double y, double z, double t, double a) {
        double r224942 = z;
        double r224943 = -1.988498731083228e+94;
        bool r224944 = r224942 <= r224943;
        double r224945 = x;
        double r224946 = -1.0;
        double r224947 = y;
        double r224948 = r224946 * r224947;
        double r224949 = r224945 * r224948;
        double r224950 = 1.358422658795214e+112;
        bool r224951 = r224942 <= r224950;
        double r224952 = r224942 * r224942;
        double r224953 = t;
        double r224954 = a;
        double r224955 = r224953 * r224954;
        double r224956 = r224952 - r224955;
        double r224957 = cbrt(r224956);
        double r224958 = fabs(r224957);
        double r224959 = cbrt(r224942);
        double r224960 = r224958 / r224959;
        double r224961 = r224960 / r224959;
        double r224962 = r224961 / r224947;
        double r224963 = r224945 / r224962;
        double r224964 = sqrt(r224957);
        double r224965 = r224964 / r224959;
        double r224966 = r224963 / r224965;
        double r224967 = r224945 * r224947;
        double r224968 = r224951 ? r224966 : r224967;
        double r224969 = r224944 ? r224949 : r224968;
        return r224969;
}

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.2
Target7.7
Herbie6.0
\[\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.988498731083228e+94

    1. Initial program 41.3

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
    2. Using strategy rm
    3. Applied associate-/l*38.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-identity38.7

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

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

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

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

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

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

    if -1.988498731083228e+94 < z < 1.358422658795214e+112

    1. Initial program 11.0

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

      \[\leadsto \color{blue}{\frac{x \cdot y}{\frac{\sqrt{z \cdot z - t \cdot a}}{z}}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt10.1

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

      \[\leadsto \frac{x \cdot y}{\frac{\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}}}}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}}\]
    7. Applied sqrt-prod10.1

      \[\leadsto \frac{x \cdot y}{\frac{\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}}}}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}}\]
    8. Applied times-frac10.2

      \[\leadsto \frac{x \cdot y}{\color{blue}{\frac{\sqrt{\sqrt[3]{z \cdot z - t \cdot a} \cdot \sqrt[3]{z \cdot z - t \cdot a}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{\sqrt{\sqrt[3]{z \cdot z - t \cdot a}}}{\sqrt[3]{z}}}}\]
    9. Applied associate-/r*9.3

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

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

    if 1.358422658795214e+112 < z

    1. Initial program 44.6

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

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

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

Reproduce

herbie shell --seed 2019308 
(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)))))