Average Error: 0.1 → 0.1
Time: 3.2s
Precision: binary64
\[\tanh x - \frac{{\left(x + 1\right)}^{x}}{\tan \left(x + 2\right)}\]
\[\tanh x - \frac{{\left(x + 1\right)}^{x}}{\tan \left(x + 2\right)}\]
\tanh x - \frac{{\left(x + 1\right)}^{x}}{\tan \left(x + 2\right)}
\tanh x - \frac{{\left(x + 1\right)}^{x}}{\tan \left(x + 2\right)}
double code(double x) {
	return ((double) (((double) tanh(x)) - ((double) (((double) pow(((double) (x + 1.0)), x)) / ((double) tan(((double) (x + 2.0))))))));
}
double code(double x) {
	return ((double) (((double) tanh(x)) - ((double) (((double) pow(((double) (x + 1.0)), x)) / ((double) tan(((double) (x + 2.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.1

    \[\tanh x - \frac{{\left(x + 1\right)}^{x}}{\tan \left(x + 2\right)}\]
  2. Final simplification0.1

    \[\leadsto \tanh x - \frac{{\left(x + 1\right)}^{x}}{\tan \left(x + 2\right)}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x)
  :name "(- (tanh x) (/ (pow (+ x 1) x) (tan (+ x 2))))"
  :precision binary64
  (- (tanh x) (/ (pow (+ x 1.0) x) (tan (+ x 2.0)))))