Average Error: 19.9 → 19.9
Time: 12.4s
Precision: 64
\[2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}\]
\[\sqrt{y \cdot z + x \cdot \left(y + z\right)} \cdot 2\]
2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}
\sqrt{y \cdot z + x \cdot \left(y + z\right)} \cdot 2
double f(double x, double y, double z) {
        double r463929 = 2.0;
        double r463930 = x;
        double r463931 = y;
        double r463932 = r463930 * r463931;
        double r463933 = z;
        double r463934 = r463930 * r463933;
        double r463935 = r463932 + r463934;
        double r463936 = r463931 * r463933;
        double r463937 = r463935 + r463936;
        double r463938 = sqrt(r463937);
        double r463939 = r463929 * r463938;
        return r463939;
}

double f(double x, double y, double z) {
        double r463940 = y;
        double r463941 = z;
        double r463942 = r463940 * r463941;
        double r463943 = x;
        double r463944 = r463940 + r463941;
        double r463945 = r463943 * r463944;
        double r463946 = r463942 + r463945;
        double r463947 = sqrt(r463946);
        double r463948 = 2.0;
        double r463949 = r463947 * r463948;
        return r463949;
}

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

Original19.9
Target19.1
Herbie19.9
\[\begin{array}{l} \mathbf{if}\;z \lt 7.636950090573674520215292914121377944071 \cdot 10^{176}:\\ \;\;\;\;2 \cdot \sqrt{\left(x + y\right) \cdot z + x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.25 \cdot \left(\left({y}^{-0.75} \cdot \left({z}^{-0.75} \cdot x\right)\right) \cdot \left(y + z\right)\right) + {z}^{0.25} \cdot {y}^{0.25}\right) \cdot \left(0.25 \cdot \left(\left({y}^{-0.75} \cdot \left({z}^{-0.75} \cdot x\right)\right) \cdot \left(y + z\right)\right) + {z}^{0.25} \cdot {y}^{0.25}\right)\right) \cdot 2\\ \end{array}\]

Derivation

  1. Initial program 19.9

    \[2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}\]
  2. Simplified19.9

    \[\leadsto \color{blue}{\sqrt{y \cdot z + x \cdot \left(y + z\right)} \cdot 2}\]
  3. Final simplification19.9

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

Reproduce

herbie shell --seed 2019209 
(FPCore (x y z)
  :name "Diagrams.TwoD.Apollonian:descartes from diagrams-contrib-1.3.0.5"
  :precision binary64

  :herbie-target
  (if (< z 7.6369500905736745e176) (* 2 (sqrt (+ (* (+ x y) z) (* x y)))) (* (* (+ (* 0.25 (* (* (pow y -0.75) (* (pow z -0.75) x)) (+ y z))) (* (pow z 0.25) (pow y 0.25))) (+ (* 0.25 (* (* (pow y -0.75) (* (pow z -0.75) x)) (+ y z))) (* (pow z 0.25) (pow y 0.25)))) 2))

  (* 2 (sqrt (+ (+ (* x y) (* x z)) (* y z)))))