Average Error: 30.0 → 0.2
Time: 13.6s
Precision: 64
Ground Truth: 128
\[\sqrt{x + 1} - \sqrt{x}\]
\[\frac{1}{\sqrt{x + 1} + \sqrt{x}}\]

Error

Bits error versus x

Target

Original30.0
Comparison0.2
Herbie0.2
\[ \frac{1}{\sqrt{x + 1} + \sqrt{x}} \]

Derivation

  1. Initial program 30.0

    \[\sqrt{x + 1} - \sqrt{x}\]
  2. Using strategy rm
  3. Applied flip-- 29.8

    \[\leadsto \color{blue}{\frac{{\left(\sqrt{x + 1}\right)}^2 - {\left(\sqrt{x}\right)}^2}{\sqrt{x + 1} + \sqrt{x}}}\]
  4. Applied simplify 0.2

    \[\leadsto \frac{\color{blue}{1}}{\sqrt{x + 1} + \sqrt{x}}\]
  5. Removed slow pow expressions

Runtime

Total time: 13.6s Debug log

Please include this information when filing a bug report:

herbie --seed '#(3818797725 3143566120 2184324829 3246640972 1191973351 1774157863)'
(FPCore (x)
  :name "NMSE example 3.1"

  :target
  (/ 1 (+ (sqrt (+ x 1)) (sqrt x)))

  (- (sqrt (+ x 1)) (sqrt x)))