Average Error: 24.5 → 6.1
Time: 4.3s
Precision: 64
\[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
\[\begin{array}{l} \mathbf{if}\;z \le -4.7649092939075702 \cdot 10^{58}:\\ \;\;\;\;-1 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;z \le 1.4676500402789059 \cdot 10^{97}:\\ \;\;\;\;\frac{x}{\frac{\sqrt{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}} \cdot \frac{y}{\frac{\sqrt{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z}}}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 1\\ \end{array}\]
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\begin{array}{l}
\mathbf{if}\;z \le -4.7649092939075702 \cdot 10^{58}:\\
\;\;\;\;-1 \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;z \le 1.4676500402789059 \cdot 10^{97}:\\
\;\;\;\;\frac{x}{\frac{\sqrt{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}} \cdot \frac{y}{\frac{\sqrt{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z}}}\\

\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot 1\\

\end{array}
double f(double x, double y, double z, double t, double a) {
        double r273892 = x;
        double r273893 = y;
        double r273894 = r273892 * r273893;
        double r273895 = z;
        double r273896 = r273894 * r273895;
        double r273897 = r273895 * r273895;
        double r273898 = t;
        double r273899 = a;
        double r273900 = r273898 * r273899;
        double r273901 = r273897 - r273900;
        double r273902 = sqrt(r273901);
        double r273903 = r273896 / r273902;
        return r273903;
}

double f(double x, double y, double z, double t, double a) {
        double r273904 = z;
        double r273905 = -4.76490929390757e+58;
        bool r273906 = r273904 <= r273905;
        double r273907 = -1.0;
        double r273908 = x;
        double r273909 = y;
        double r273910 = r273908 * r273909;
        double r273911 = r273907 * r273910;
        double r273912 = 1.4676500402789059e+97;
        bool r273913 = r273904 <= r273912;
        double r273914 = r273904 * r273904;
        double r273915 = t;
        double r273916 = a;
        double r273917 = r273915 * r273916;
        double r273918 = r273914 - r273917;
        double r273919 = sqrt(r273918);
        double r273920 = sqrt(r273919);
        double r273921 = cbrt(r273904);
        double r273922 = r273921 * r273921;
        double r273923 = r273920 / r273922;
        double r273924 = r273908 / r273923;
        double r273925 = r273920 / r273921;
        double r273926 = r273909 / r273925;
        double r273927 = r273924 * r273926;
        double r273928 = 1.0;
        double r273929 = r273910 * r273928;
        double r273930 = r273913 ? r273927 : r273929;
        double r273931 = r273906 ? r273911 : r273930;
        return r273931;
}

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.5
Target7.5
Herbie6.1
\[\begin{array}{l} \mathbf{if}\;z \lt -3.1921305903852764 \cdot 10^{46}:\\ \;\;\;\;-y \cdot x\\ \mathbf{elif}\;z \lt 5.9762681209208942 \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 < -4.76490929390757e+58

    1. Initial program 38.4

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

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

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

    if -4.76490929390757e+58 < z < 1.4676500402789059e+97

    1. Initial program 10.8

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

      \[\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.4

      \[\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-sqr-sqrt10.4

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

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

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

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

    if 1.4676500402789059e+97 < z

    1. Initial program 43.8

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

      \[\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-prod43.8

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -4.7649092939075702 \cdot 10^{58}:\\ \;\;\;\;-1 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;z \le 1.4676500402789059 \cdot 10^{97}:\\ \;\;\;\;\frac{x}{\frac{\sqrt{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}} \cdot \frac{y}{\frac{\sqrt{\sqrt{z \cdot z - t \cdot a}}}{\sqrt[3]{z}}}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot y\right) \cdot 1\\ \end{array}\]

Reproduce

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