Average Error: 0.4 → 0.4
Time: 53.1s
Precision: 64
Internal Precision: 384
\[\left(3.0 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1.0}{x \cdot 9.0}\right) - 1.0\right)\]
\[\sqrt{x} \cdot \left(3.0 \cdot y\right) + \left(\frac{\frac{1.0}{x}}{9.0} - 1.0\right) \cdot \left(\sqrt{x} \cdot 3.0\right)\]

Error

Bits error versus x

Bits error versus y

Target

Original0.4
Target0.4
Herbie0.4
\[3.0 \cdot \left(y \cdot \sqrt{x} + \left(\frac{1.0}{x \cdot 9.0} - 1.0\right) \cdot \sqrt{x}\right)\]

Derivation

  1. Initial program 0.4

    \[\left(3.0 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1.0}{x \cdot 9.0}\right) - 1.0\right)\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.7

    \[\leadsto \left(3.0 \cdot \color{blue}{\left(\sqrt{\sqrt{x}} \cdot \sqrt{\sqrt{x}}\right)}\right) \cdot \left(\left(y + \frac{1.0}{x \cdot 9.0}\right) - 1.0\right)\]
  4. Applied associate-*r*0.7

    \[\leadsto \color{blue}{\left(\left(3.0 \cdot \sqrt{\sqrt{x}}\right) \cdot \sqrt{\sqrt{x}}\right)} \cdot \left(\left(y + \frac{1.0}{x \cdot 9.0}\right) - 1.0\right)\]
  5. Using strategy rm
  6. Applied associate--l+0.7

    \[\leadsto \left(\left(3.0 \cdot \sqrt{\sqrt{x}}\right) \cdot \sqrt{\sqrt{x}}\right) \cdot \color{blue}{\left(y + \left(\frac{1.0}{x \cdot 9.0} - 1.0\right)\right)}\]
  7. Applied distribute-lft-in0.7

    \[\leadsto \color{blue}{\left(\left(3.0 \cdot \sqrt{\sqrt{x}}\right) \cdot \sqrt{\sqrt{x}}\right) \cdot y + \left(\left(3.0 \cdot \sqrt{\sqrt{x}}\right) \cdot \sqrt{\sqrt{x}}\right) \cdot \left(\frac{1.0}{x \cdot 9.0} - 1.0\right)}\]
  8. Applied simplify0.6

    \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3.0 \cdot y\right)} + \left(\left(3.0 \cdot \sqrt{\sqrt{x}}\right) \cdot \sqrt{\sqrt{x}}\right) \cdot \left(\frac{1.0}{x \cdot 9.0} - 1.0\right)\]
  9. Applied simplify0.4

    \[\leadsto \sqrt{x} \cdot \left(3.0 \cdot y\right) + \color{blue}{\left(\frac{\frac{1.0}{x}}{9.0} - 1.0\right) \cdot \left(\sqrt{x} \cdot 3.0\right)}\]
  10. Removed slow pow expressions.

Runtime

Time bar (total: 53.1s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, B"

  :herbie-target
  (* 3.0 (+ (* y (sqrt x)) (* (- (/ 1.0 (* x 9.0)) 1.0) (sqrt x))))

  (* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))