Average Error: 14.1 → 1.7
Time: 4.5s
Precision: binary64
\[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
\[\begin{array}{l} \mathbf{if}\;x \cdot y \leq -6.072582763214135 \cdot 10^{+302}:\\ \;\;\;\;\left(x \cdot \frac{\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}\right) \cdot \frac{\frac{\sqrt[3]{y}}{\sqrt[3]{z}}}{z + 1}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \frac{\frac{\sqrt[3]{y}}{z}}{z + 1}\\ \end{array}\]
\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -6.072582763214135 \cdot 10^{+302}:\\
\;\;\;\;\left(x \cdot \frac{\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}\right) \cdot \frac{\frac{\sqrt[3]{y}}{\sqrt[3]{z}}}{z + 1}\\

\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \frac{\frac{\sqrt[3]{y}}{z}}{z + 1}\\

\end{array}
double code(double x, double y, double z) {
	return (((double) (x * y)) / ((double) (((double) (z * z)) * ((double) (z + 1.0)))));
}
double code(double x, double y, double z) {
	double VAR;
	if ((((double) (x * y)) <= -6.072582763214135e+302)) {
		VAR = ((double) (((double) (x * (((double) (((double) cbrt(y)) * (((double) cbrt(y)) / z))) / ((double) (((double) cbrt(z)) * ((double) cbrt(z))))))) * ((((double) cbrt(y)) / ((double) cbrt(z))) / ((double) (z + 1.0)))));
	} else {
		VAR = ((double) (((double) (x * ((double) (((double) cbrt(y)) * (((double) cbrt(y)) / z))))) * ((((double) cbrt(y)) / z) / ((double) (z + 1.0)))));
	}
	return VAR;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original14.1
Target3.9
Herbie1.7
\[\begin{array}{l} \mathbf{if}\;z < 249.6182814532307:\\ \;\;\;\;\frac{y \cdot \frac{x}{z}}{z + z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{y}{z}}{1 + z} \cdot x}{z}\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if (* x y) < -6.072582763214135e302

    1. Initial program Error: 62.1 bits

      \[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
    2. SimplifiedError: 30.0 bits

      \[\leadsto \color{blue}{x \cdot \frac{y}{z \cdot \left(z \cdot \left(z + 1\right)\right)}}\]
    3. Using strategy rm
    4. Applied add-cube-cbrtError: 30.2 bits

      \[\leadsto x \cdot \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{z \cdot \left(z \cdot \left(z + 1\right)\right)}\]
    5. Applied times-fracError: 20.9 bits

      \[\leadsto x \cdot \color{blue}{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{z} \cdot \frac{\sqrt[3]{y}}{z \cdot \left(z + 1\right)}\right)}\]
    6. Applied associate-*r*Error: 23.9 bits

      \[\leadsto \color{blue}{\left(x \cdot \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{z}\right) \cdot \frac{\sqrt[3]{y}}{z \cdot \left(z + 1\right)}}\]
    7. SimplifiedError: 23.9 bits

      \[\leadsto \color{blue}{\left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right)} \cdot \frac{\sqrt[3]{y}}{z \cdot \left(z + 1\right)}\]
    8. Using strategy rm
    9. Applied associate-/r*Error: 14.6 bits

      \[\leadsto \left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \color{blue}{\frac{\frac{\sqrt[3]{y}}{z}}{z + 1}}\]
    10. Using strategy rm
    11. Applied *-un-lft-identityError: 14.6 bits

      \[\leadsto \left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \frac{\frac{\sqrt[3]{y}}{z}}{\color{blue}{1 \cdot \left(z + 1\right)}}\]
    12. Applied add-cube-cbrtError: 14.7 bits

      \[\leadsto \left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \frac{\frac{\sqrt[3]{y}}{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}}}{1 \cdot \left(z + 1\right)}\]
    13. Applied *-un-lft-identityError: 14.7 bits

      \[\leadsto \left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \frac{\frac{\color{blue}{1 \cdot \sqrt[3]{y}}}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}}{1 \cdot \left(z + 1\right)}\]
    14. Applied times-fracError: 14.7 bits

      \[\leadsto \left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \frac{\color{blue}{\frac{1}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{z}}}}{1 \cdot \left(z + 1\right)}\]
    15. Applied times-fracError: 14.8 bits

      \[\leadsto \left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \color{blue}{\left(\frac{\frac{1}{\sqrt[3]{z} \cdot \sqrt[3]{z}}}{1} \cdot \frac{\frac{\sqrt[3]{y}}{\sqrt[3]{z}}}{z + 1}\right)}\]
    16. Applied associate-*r*Error: 5.1 bits

      \[\leadsto \color{blue}{\left(\left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \frac{\frac{1}{\sqrt[3]{z} \cdot \sqrt[3]{z}}}{1}\right) \cdot \frac{\frac{\sqrt[3]{y}}{\sqrt[3]{z}}}{z + 1}}\]
    17. SimplifiedError: 1.3 bits

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

    if -6.072582763214135e302 < (* x y)

    1. Initial program Error: 12.2 bits

      \[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
    2. SimplifiedError: 12.5 bits

      \[\leadsto \color{blue}{x \cdot \frac{y}{z \cdot \left(z \cdot \left(z + 1\right)\right)}}\]
    3. Using strategy rm
    4. Applied add-cube-cbrtError: 12.9 bits

      \[\leadsto x \cdot \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{z \cdot \left(z \cdot \left(z + 1\right)\right)}\]
    5. Applied times-fracError: 8.3 bits

      \[\leadsto x \cdot \color{blue}{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{z} \cdot \frac{\sqrt[3]{y}}{z \cdot \left(z + 1\right)}\right)}\]
    6. Applied associate-*r*Error: 2.3 bits

      \[\leadsto \color{blue}{\left(x \cdot \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{z}\right) \cdot \frac{\sqrt[3]{y}}{z \cdot \left(z + 1\right)}}\]
    7. SimplifiedError: 2.3 bits

      \[\leadsto \color{blue}{\left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right)} \cdot \frac{\sqrt[3]{y}}{z \cdot \left(z + 1\right)}\]
    8. Using strategy rm
    9. Applied associate-/r*Error: 1.7 bits

      \[\leadsto \left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \color{blue}{\frac{\frac{\sqrt[3]{y}}{z}}{z + 1}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplificationError: 1.7 bits

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot y \leq -6.072582763214135 \cdot 10^{+302}:\\ \;\;\;\;\left(x \cdot \frac{\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}\right) \cdot \frac{\frac{\sqrt[3]{y}}{\sqrt[3]{z}}}{z + 1}\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \frac{\frac{\sqrt[3]{y}}{z}}{z + 1}\\ \end{array}\]

Reproduce

herbie shell --seed 2020200 
(FPCore (x y z)
  :name "Statistics.Distribution.Beta:$cvariance from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (if (< z 249.6182814532307) (/ (* y (/ x z)) (+ z (* z z))) (/ (* (/ (/ y z) (+ 1.0 z)) x) z))

  (/ (* x y) (* (* z z) (+ z 1.0))))