Average Error: 18.6 → 18.6
Time: 53.0s
Precision: 64
Internal Precision: 384
\[2.0 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}\]
\[\sqrt{x \cdot \left(z + y\right) + y \cdot z} \cdot 2.0\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original18.6
Target18.0
Herbie18.6
\[\begin{array}{l} \mathbf{if}\;z \lt 7.636950090573675 \cdot 10^{+176}:\\ \;\;\;\;2.0 \cdot \sqrt{\left(x + y\right) \cdot z + x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{1}{4} \cdot \left(\left({y}^{\frac{-3}{4}} \cdot \left({z}^{\frac{-3}{4}} \cdot x\right)\right) \cdot \left(y + z\right)\right) + {z}^{\frac{1}{4}} \cdot {y}^{\frac{1}{4}}\right)}^2 \cdot 2.0\\ \end{array}\]

Derivation

  1. Initial program 18.6

    \[2.0 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}\]
  2. Applied simplify18.6

    \[\leadsto \color{blue}{\sqrt{y \cdot x + z \cdot \left(x + y\right)} \cdot 2.0}\]
  3. Taylor expanded around 0 18.6

    \[\leadsto \sqrt{\color{blue}{z \cdot x + \left(z \cdot y + y \cdot x\right)}} \cdot 2.0\]
  4. Applied simplify18.6

    \[\leadsto \color{blue}{\sqrt{x \cdot \left(z + y\right) + y \cdot z} \cdot 2.0}\]
  5. Removed slow pow expressions.

Runtime

Time bar (total: 53.0s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x y z)
  :name "Diagrams.TwoD.Apollonian:descartes from diagrams-contrib-1.3.0.5"

  :herbie-target
  (if (< z 7.636950090573675e+176) (* 2.0 (sqrt (+ (* (+ x y) z) (* x y)))) (* (sqr (+ (* 1/4 (* (* (pow y -3/4) (* (pow z -3/4) x)) (+ y z))) (* (pow z 1/4) (pow y 1/4)))) 2.0))

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