Average Error: 0.2 → 0.0
Time: 51.8s
Precision: 64
Internal Precision: 384
\[\frac{6.0 \cdot \left(x - 1.0\right)}{\left(x + 1.0\right) + 4.0 \cdot \sqrt{x}}\]
\[\frac{6.0}{1} \cdot \frac{x - 1.0}{\left(x + 1.0\right) + 4.0 \cdot \sqrt{x}}\]

Error

Bits error versus x

Target

Original0.2
Target0.1
Herbie0.0
\[\frac{6.0}{\frac{\left(x + 1.0\right) + 4.0 \cdot \sqrt{x}}{x - 1.0}}\]

Derivation

  1. Initial program 0.2

    \[\frac{6.0 \cdot \left(x - 1.0\right)}{\left(x + 1.0\right) + 4.0 \cdot \sqrt{x}}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.2

    \[\leadsto \frac{6.0 \cdot \left(x - 1.0\right)}{\color{blue}{1 \cdot \left(\left(x + 1.0\right) + 4.0 \cdot \sqrt{x}\right)}}\]
  4. Applied times-frac0.0

    \[\leadsto \color{blue}{\frac{6.0}{1} \cdot \frac{x - 1.0}{\left(x + 1.0\right) + 4.0 \cdot \sqrt{x}}}\]
  5. Removed slow pow expressions.

Runtime

Time bar (total: 51.8s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x)
  :name "Data.Approximate.Numerics:blog from approximate-0.2.2.1"

  :herbie-target
  (/ 6.0 (/ (+ (+ x 1.0) (* 4.0 (sqrt x))) (- x 1.0)))

  (/ (* 6.0 (- x 1.0)) (+ (+ x 1.0) (* 4.0 (sqrt x)))))