Average Error: 0.2 → 0.2
Time: 2.4s
Precision: binary64
\[\frac{x}{1 + \sqrt{x + 1}}\]
\[x \cdot \frac{1}{1 + \sqrt{x + 1}}\]
\frac{x}{1 + \sqrt{x + 1}}
x \cdot \frac{1}{1 + \sqrt{x + 1}}
(FPCore (x) :precision binary64 (/ x (+ 1.0 (sqrt (+ x 1.0)))))
(FPCore (x) :precision binary64 (* x (/ 1.0 (+ 1.0 (sqrt (+ x 1.0))))))
double code(double x) {
	return x / (1.0 + sqrt(x + 1.0));
}
double code(double x) {
	return x * (1.0 / (1.0 + sqrt(x + 1.0)));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\frac{x}{1 + \sqrt{x + 1}}\]
  2. Using strategy rm
  3. Applied div-inv_binary640.2

    \[\leadsto \color{blue}{x \cdot \frac{1}{1 + \sqrt{x + 1}}}\]
  4. Final simplification0.2

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

Reproduce

herbie shell --seed 2020232 
(FPCore (x)
  :name "Numeric.Log:$clog1p from log-domain-0.10.2.1, B"
  :precision binary64
  (/ x (+ 1.0 (sqrt (+ x 1.0)))))