Average Error: 14.8 → 0.0
Time: 5.2s
Precision: 64
Internal Precision: 576
\[\frac{x}{x \cdot x + 1}\]
\[\frac{x}{\sqrt{1^2 + x^2}^*} \cdot \frac{1}{\sqrt{1^2 + x^2}^*}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original14.8
Target0.1
Herbie0.0
\[\frac{1}{x + \frac{1}{x}}\]

Derivation

  1. Initial program 14.8

    \[\frac{x}{x \cdot x + 1}\]
  2. Initial simplification14.8

    \[\leadsto \frac{x}{(x \cdot x + 1)_*}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity14.8

    \[\leadsto \frac{x}{\color{blue}{1 \cdot (x \cdot x + 1)_*}}\]
  5. Applied associate-/r*14.8

    \[\leadsto \color{blue}{\frac{\frac{x}{1}}{(x \cdot x + 1)_*}}\]
  6. Using strategy rm
  7. Applied add-sqr-sqrt14.8

    \[\leadsto \frac{\frac{x}{1}}{\color{blue}{\sqrt{(x \cdot x + 1)_*} \cdot \sqrt{(x \cdot x + 1)_*}}}\]
  8. Applied div-inv14.8

    \[\leadsto \frac{\color{blue}{x \cdot \frac{1}{1}}}{\sqrt{(x \cdot x + 1)_*} \cdot \sqrt{(x \cdot x + 1)_*}}\]
  9. Applied times-frac14.7

    \[\leadsto \color{blue}{\frac{x}{\sqrt{(x \cdot x + 1)_*}} \cdot \frac{\frac{1}{1}}{\sqrt{(x \cdot x + 1)_*}}}\]
  10. Simplified14.7

    \[\leadsto \color{blue}{\frac{x}{\sqrt{1^2 + x^2}^*}} \cdot \frac{\frac{1}{1}}{\sqrt{(x \cdot x + 1)_*}}\]
  11. Simplified0.0

    \[\leadsto \frac{x}{\sqrt{1^2 + x^2}^*} \cdot \color{blue}{\frac{1}{\sqrt{1^2 + x^2}^*}}\]
  12. Final simplification0.0

    \[\leadsto \frac{x}{\sqrt{1^2 + x^2}^*} \cdot \frac{1}{\sqrt{1^2 + x^2}^*}\]

Runtime

Time bar (total: 5.2s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.00.00.00.00%
herbie shell --seed 2018274 +o rules:numerics
(FPCore (x)
  :name "x / (x^2 + 1)"

  :herbie-target
  (/ 1 (+ x (/ 1 x)))

  (/ x (+ (* x x) 1)))