Average Error: 24.1 → 6.3
Time: 6.2s
Precision: binary64
\[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
\[\begin{array}{l} \mathbf{if}\;z \leq -5.342208561463816 \cdot 10^{+77}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{0.5 \cdot \left(t \cdot \frac{a}{z}\right) - z}\right)\\ \mathbf{elif}\;z \leq 1.860229807699452 \cdot 10^{+118}:\\ \;\;\;\;x \cdot \left(\frac{\sqrt[3]{z}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}} \cdot \left(y \cdot \left(\sqrt[3]{z} \cdot \frac{\sqrt[3]{z}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + \left(t \cdot \frac{a}{z}\right) \cdot -0.5}\right)\\ \end{array}\]
\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}
\begin{array}{l}
\mathbf{if}\;z \leq -5.342208561463816 \cdot 10^{+77}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{z}{0.5 \cdot \left(t \cdot \frac{a}{z}\right) - z}\right)\\

\mathbf{elif}\;z \leq 1.860229807699452 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \left(\frac{\sqrt[3]{z}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}} \cdot \left(y \cdot \left(\sqrt[3]{z} \cdot \frac{\sqrt[3]{z}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{z}{z + \left(t \cdot \frac{a}{z}\right) \cdot -0.5}\right)\\

\end{array}
(FPCore (x y z t a)
 :precision binary64
 (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5.342208561463816e+77)
   (* x (* y (/ z (- (* 0.5 (* t (/ a z))) z))))
   (if (<= z 1.860229807699452e+118)
     (*
      x
      (*
       (/ (cbrt z) (sqrt (sqrt (- (* z z) (* t a)))))
       (* y (* (cbrt z) (/ (cbrt z) (sqrt (sqrt (- (* z z) (* t a)))))))))
     (* y (* x (/ z (+ z (* (* t (/ a z)) -0.5))))))))
double code(double x, double y, double z, double t, double a) {
	return (((double) (((double) (x * y)) * z)) / ((double) sqrt(((double) (((double) (z * z)) - ((double) (t * a)))))));
}
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -5.342208561463816e+77)) {
		tmp = ((double) (x * ((double) (y * (z / ((double) (((double) (0.5 * ((double) (t * (a / z))))) - z)))))));
	} else {
		double tmp_1;
		if ((z <= 1.860229807699452e+118)) {
			tmp_1 = ((double) (x * ((double) ((((double) cbrt(z)) / ((double) sqrt(((double) sqrt(((double) (((double) (z * z)) - ((double) (t * a))))))))) * ((double) (y * ((double) (((double) cbrt(z)) * (((double) cbrt(z)) / ((double) sqrt(((double) sqrt(((double) (((double) (z * z)) - ((double) (t * a)))))))))))))))));
		} else {
			tmp_1 = ((double) (y * ((double) (x * (z / ((double) (z + ((double) (((double) (t * (a / z))) * -0.5)))))))));
		}
		tmp = tmp_1;
	}
	return tmp;
}

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.1
Target7.6
Herbie6.3
\[\begin{array}{l} \mathbf{if}\;z < -3.1921305903852764 \cdot 10^{+46}:\\ \;\;\;\;-y \cdot x\\ \mathbf{elif}\;z < 5.976268120920894 \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 < -5.34220856146381615e77

    1. Initial program Error: 40.0 bits

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
    2. SimplifiedError: 37.7 bits

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)}\]
    3. Taylor expanded around -inf Error: 5.7 bits

      \[\leadsto x \cdot \left(y \cdot \frac{z}{\color{blue}{0.5 \cdot \frac{a \cdot t}{z} - z}}\right)\]
    4. SimplifiedError: 2.4 bits

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

    if -5.34220856146381615e77 < z < 1.860229807699452e118

    1. Initial program Error: 10.7 bits

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
    2. SimplifiedError: 9.1 bits

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)}\]
    3. Using strategy rm
    4. Applied add-sqr-sqrtError: 9.1 bits

      \[\leadsto x \cdot \left(y \cdot \frac{z}{\sqrt{\color{blue}{\sqrt{z \cdot z - t \cdot a} \cdot \sqrt{z \cdot z - t \cdot a}}}}\right)\]
    5. Applied sqrt-prodError: 9.4 bits

      \[\leadsto x \cdot \left(y \cdot \frac{z}{\color{blue}{\sqrt{\sqrt{z \cdot z - t \cdot a}} \cdot \sqrt{\sqrt{z \cdot z - t \cdot a}}}}\right)\]
    6. Applied add-cube-cbrtError: 9.9 bits

      \[\leadsto x \cdot \left(y \cdot \frac{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}}{\sqrt{\sqrt{z \cdot z - t \cdot a}} \cdot \sqrt{\sqrt{z \cdot z - t \cdot a}}}\right)\]
    7. Applied times-fracError: 9.9 bits

      \[\leadsto x \cdot \left(y \cdot \color{blue}{\left(\frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}} \cdot \frac{\sqrt[3]{z}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}\right)}\right)\]
    8. Applied associate-*r*Error: 9.3 bits

      \[\leadsto x \cdot \color{blue}{\left(\left(y \cdot \frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}\right) \cdot \frac{\sqrt[3]{z}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}\right)}\]
    9. SimplifiedError: 9.3 bits

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

    if 1.860229807699452e118 < z

    1. Initial program Error: 46.1 bits

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}}\]
    2. SimplifiedError: 44.1 bits

      \[\leadsto \color{blue}{x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)}\]
    3. Using strategy rm
    4. Applied pow1Error: 44.1 bits

      \[\leadsto x \cdot \left(y \cdot \color{blue}{{\left(\frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)}^{1}}\right)\]
    5. Applied pow1Error: 44.1 bits

      \[\leadsto x \cdot \left(\color{blue}{{y}^{1}} \cdot {\left(\frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)}^{1}\right)\]
    6. Applied pow-prod-downError: 44.1 bits

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

      \[\leadsto \color{blue}{{x}^{1}} \cdot {\left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)}^{1}\]
    8. Applied pow-prod-downError: 44.1 bits

      \[\leadsto \color{blue}{{\left(x \cdot \left(y \cdot \frac{z}{\sqrt{z \cdot z - t \cdot a}}\right)\right)}^{1}}\]
    9. SimplifiedError: 44.1 bits

      \[\leadsto {\color{blue}{\left(y \cdot \left(\frac{z}{\sqrt{z \cdot z - t \cdot a}} \cdot x\right)\right)}}^{1}\]
    10. Taylor expanded around inf Error: 5.8 bits

      \[\leadsto {\left(y \cdot \left(\frac{z}{\color{blue}{z - 0.5 \cdot \frac{a \cdot t}{z}}} \cdot x\right)\right)}^{1}\]
    11. SimplifiedError: 1.5 bits

      \[\leadsto {\left(y \cdot \left(\frac{z}{\color{blue}{z + \left(t \cdot \frac{a}{z}\right) \cdot -0.5}} \cdot x\right)\right)}^{1}\]
  3. Recombined 3 regimes into one program.
  4. Final simplificationError: 6.3 bits

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.342208561463816 \cdot 10^{+77}:\\ \;\;\;\;x \cdot \left(y \cdot \frac{z}{0.5 \cdot \left(t \cdot \frac{a}{z}\right) - z}\right)\\ \mathbf{elif}\;z \leq 1.860229807699452 \cdot 10^{+118}:\\ \;\;\;\;x \cdot \left(\frac{\sqrt[3]{z}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}} \cdot \left(y \cdot \left(\sqrt[3]{z} \cdot \frac{\sqrt[3]{z}}{\sqrt{\sqrt{z \cdot z - t \cdot a}}}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \frac{z}{z + \left(t \cdot \frac{a}{z}\right) \cdot -0.5}\right)\\ \end{array}\]

Reproduce

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