Average Error: 19.3 → 19.3
Time: 11.5s
Precision: 64
\[2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}\]
\[2 \cdot \sqrt{y \cdot \left(z + x\right) + x \cdot z}\]
2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}
2 \cdot \sqrt{y \cdot \left(z + x\right) + x \cdot z}
double f(double x, double y, double z) {
        double r469863 = 2.0;
        double r469864 = x;
        double r469865 = y;
        double r469866 = r469864 * r469865;
        double r469867 = z;
        double r469868 = r469864 * r469867;
        double r469869 = r469866 + r469868;
        double r469870 = r469865 * r469867;
        double r469871 = r469869 + r469870;
        double r469872 = sqrt(r469871);
        double r469873 = r469863 * r469872;
        return r469873;
}

double f(double x, double y, double z) {
        double r469874 = 2.0;
        double r469875 = y;
        double r469876 = z;
        double r469877 = x;
        double r469878 = r469876 + r469877;
        double r469879 = r469875 * r469878;
        double r469880 = r469877 * r469876;
        double r469881 = r469879 + r469880;
        double r469882 = sqrt(r469881);
        double r469883 = r469874 * r469882;
        return r469883;
}

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.3
Target19.0
Herbie19.3
\[\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.3

    \[2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}\]
  2. Taylor expanded around 0 19.3

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

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

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

Reproduce

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