Average Error: 0.2 → 0.1
Time: 36.7s
Precision: 64
Internal precision: 128
\[\frac{6.0 \cdot \left(x - 1.0\right)}{\left(x + 1.0\right) + 4.0 \cdot \sqrt{x}}\]
\[\frac{6.0}{1} \cdot \log \left(e^{\frac{x - 1.0}{\left(x + 1.0\right) + 4.0 \cdot \sqrt{x}}}\right)\]

Error

Bits error versus x

Target

Original0.2
Comparison0.0
Herbie0.1
\[ \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-identity 0.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-frac 0.0

    \[\leadsto \color{blue}{\frac{6.0}{1} \cdot \frac{x - 1.0}{\left(x + 1.0\right) + 4.0 \cdot \sqrt{x}}}\]
  5. Using strategy rm
  6. Applied add-log-exp 0.1

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

Runtime

Time bar (total: 36.7s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(2866882336 478417643 2774068042 4214259854 1794292241 402697907)'
(FPCore (x)
  :name "Data.Approximate.Numerics:blog from approximate-0.2.2.1"

  :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)))))