Average Error: 13.1 → 13.1
Time: 13.3s
Precision: binary64
\[\left(\left(1 + x\right) - \frac{1}{1 + x}\right) - 2 \cdot \log \left(1 + x\right)\]
\[\left(\left(1 + x\right) - \frac{1}{1 + x}\right) - 2 \cdot \log \left(1 + x\right)\]
\left(\left(1 + x\right) - \frac{1}{1 + x}\right) - 2 \cdot \log \left(1 + x\right)
\left(\left(1 + x\right) - \frac{1}{1 + x}\right) - 2 \cdot \log \left(1 + x\right)
double code(double x) {
	return ((double) (((double) (((double) (1.0 + x)) - ((double) (1.0 / ((double) (1.0 + x)))))) - ((double) (2.0 * ((double) log(((double) (1.0 + x))))))));
}
double code(double x) {
	return ((double) (((double) (((double) (1.0 + x)) - ((double) (1.0 / ((double) (1.0 + x)))))) - ((double) (2.0 * ((double) log(((double) (1.0 + x))))))));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 13.1

    \[\left(\left(1 + x\right) - \frac{1}{1 + x}\right) - 2 \cdot \log \left(1 + x\right)\]
  2. Final simplification13.1

    \[\leadsto \left(\left(1 + x\right) - \frac{1}{1 + x}\right) - 2 \cdot \log \left(1 + x\right)\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x)
  :name "(- (- (+ 1 x) (/ 1 (+ 1 x))) (* 2 (log (+ 1 x))))"
  :precision binary64
  (- (- (+ 1.0 x) (/ 1.0 (+ 1.0 x))) (* 2.0 (log (+ 1.0 x)))))