Average Error: 6.5 → 6.5
Time: 5.8s
Precision: binary64
Cost: 704
\[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
\[\frac{\frac{1}{x}}{y + y \cdot \left(z \cdot z\right)}\]
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\frac{\frac{1}{x}}{y + y \cdot \left(z \cdot z\right)}
(FPCore (x y z) :precision binary64 (/ (/ 1.0 x) (* y (+ 1.0 (* z z)))))
(FPCore (x y z) :precision binary64 (/ (/ 1.0 x) (+ y (* y (* z z)))))
double code(double x, double y, double z) {
	return (1.0 / x) / (y * (1.0 + (z * z)));
}
double code(double x, double y, double z) {
	return (1.0 / x) / (y + (y * (z * z)));
}

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

Original6.5
Target5.7
Herbie6.5
\[\begin{array}{l} \mathbf{if}\;y \cdot \left(1 + z \cdot z\right) < -\infty:\\ \;\;\;\;\frac{\frac{1}{y}}{\left(1 + z \cdot z\right) \cdot x}\\ \mathbf{elif}\;y \cdot \left(1 + z \cdot z\right) < 8.680743250567252 \cdot 10^{+305}:\\ \;\;\;\;\frac{\frac{1}{x}}{\left(1 + z \cdot z\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{y}}{\left(1 + z \cdot z\right) \cdot x}\\ \end{array}\]

Alternatives

Alternative 1
Error6.5
Cost704
\[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
Alternative 2
Error7.1
Cost904
\[\begin{array}{l} \mathbf{if}\;z \leq -1624482.6004077473 \lor \neg \left(z \leq 1.0112305529574455\right):\\ \;\;\;\;\frac{\frac{1}{x}}{y \cdot \left(z \cdot z\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{x}}{y}\\ \end{array}\]
Alternative 3
Error7.2
Cost1025
\[\begin{array}{l} \mathbf{if}\;z \cdot z \leq 3.5935016702128946 \cdot 10^{-10}:\\ \;\;\;\;\frac{\frac{1}{x}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(z \cdot z\right) \cdot \left(x \cdot y\right)}\\ \end{array}\]
Alternative 4
Error16.1
Cost962
\[\begin{array}{l} \mathbf{if}\;z \leq -2.0940098344860414 \cdot 10^{+36}:\\ \;\;\;\;0\\ \mathbf{elif}\;z \leq 82604658314878.4:\\ \;\;\;\;\frac{\frac{1}{x}}{y}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
Alternative 5
Error16.3
Cost962
\[\begin{array}{l} \mathbf{if}\;z \leq -2.8703967636759144 \cdot 10^{+37}:\\ \;\;\;\;0\\ \mathbf{elif}\;z \leq 128205759659906.72:\\ \;\;\;\;\frac{1}{x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array}\]
Alternative 6
Error40.7
Cost64
\[0\]
Alternative 7
Error61.8
Cost64
\[1\]

Error

Derivation

  1. Initial program 6.5

    \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
  2. Using strategy rm
  3. Applied distribute-rgt-in_binary64_116226.5

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

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

    \[\leadsto \frac{\frac{1}{x}}{y + \color{blue}{y \cdot \left(z \cdot z\right)}}\]
  6. Simplified6.5

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

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

Reproduce

herbie shell --seed 2021044 
(FPCore (x y z)
  :name "Statistics.Distribution.CauchyLorentz:$cdensity from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (if (< (* y (+ 1.0 (* z z))) (- INFINITY)) (/ (/ 1.0 y) (* (+ 1.0 (* z z)) x)) (if (< (* y (+ 1.0 (* z z))) 8.680743250567252e+305) (/ (/ 1.0 x) (* (+ 1.0 (* z z)) y)) (/ (/ 1.0 y) (* (+ 1.0 (* z z)) x))))

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