Average Error: 14.3 → 3.2
Time: 3.5s
Precision: binary64
\[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
\[\frac{\frac{x}{z}}{\left(z + 1\right) \cdot \frac{z}{y}}\]
\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}
\frac{\frac{x}{z}}{\left(z + 1\right) \cdot \frac{z}{y}}
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 / z)) / ((double) (((double) (z + 1.0)) * ((double) (z / y))))));
}

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.3
Target4.0
Herbie3.2
\[\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 14.3

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

    \[\leadsto \color{blue}{x \cdot \frac{y}{z \cdot \left(z \cdot \left(z + 1\right)\right)}}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity13.4

    \[\leadsto x \cdot \frac{\color{blue}{1 \cdot y}}{z \cdot \left(z \cdot \left(z + 1\right)\right)}\]
  5. Applied times-frac8.2

    \[\leadsto x \cdot \color{blue}{\left(\frac{1}{z} \cdot \frac{y}{z \cdot \left(z + 1\right)}\right)}\]
  6. Applied associate-*r*4.9

    \[\leadsto \color{blue}{\left(x \cdot \frac{1}{z}\right) \cdot \frac{y}{z \cdot \left(z + 1\right)}}\]
  7. Simplified4.9

    \[\leadsto \color{blue}{\frac{x}{z}} \cdot \frac{y}{z \cdot \left(z + 1\right)}\]
  8. Using strategy rm
  9. Applied clear-num5.0

    \[\leadsto \frac{x}{z} \cdot \color{blue}{\frac{1}{\frac{z \cdot \left(z + 1\right)}{y}}}\]
  10. Simplified3.4

    \[\leadsto \frac{x}{z} \cdot \frac{1}{\color{blue}{\left(z + 1\right) \cdot \frac{z}{y}}}\]
  11. Using strategy rm
  12. Applied un-div-inv3.2

    \[\leadsto \color{blue}{\frac{\frac{x}{z}}{\left(z + 1\right) \cdot \frac{z}{y}}}\]
  13. Final simplification3.2

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

Reproduce

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