Average Error: 15.2 → 2.4
Time: 4.1s
Precision: binary64
\[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
\[\left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \left(\frac{\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}}}{z} \cdot \frac{\sqrt[3]{\sqrt[3]{y}}}{z + 1}\right)\]
\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}
\left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \left(\frac{\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}}}{z} \cdot \frac{\sqrt[3]{\sqrt[3]{y}}}{z + 1}\right)
double code(double x, double y, double z) {
	return ((double) (((double) (x * y)) / ((double) (((double) (z * z)) * ((double) (z + 1.0))))));
}
double code(double x, double y, double z) {
	return ((double) (((double) (x * ((double) (((double) cbrt(y)) * ((double) (((double) cbrt(y)) / z)))))) * ((double) (((double) (((double) cbrt(((double) (((double) cbrt(y)) * ((double) cbrt(y)))))) / z)) * ((double) (((double) cbrt(((double) cbrt(y)))) / ((double) (z + 1.0))))))));
}

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

Original15.2
Target4.1
Herbie2.4
\[\begin{array}{l} \mathbf{if}\;z \lt 249.618281453230708:\\ \;\;\;\;\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. Initial program 15.2

    \[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
  2. Simplified13.7

    \[\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-cbrt14.0

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

    \[\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*3.3

    \[\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. Simplified3.3

    \[\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 add-cube-cbrt3.3

    \[\leadsto \left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \frac{\sqrt[3]{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}}{z \cdot \left(z + 1\right)}\]
  10. Applied cbrt-prod3.4

    \[\leadsto \left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \frac{\color{blue}{\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \sqrt[3]{\sqrt[3]{y}}}}{z \cdot \left(z + 1\right)}\]
  11. Applied times-frac2.4

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

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

Reproduce

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