Average Error: 36.9 → 36.9
Time: 3.0s
Precision: binary64
\[\tan \left(x + \varepsilon\right) - \tan x\]
\[\tan \left(x + \varepsilon\right) - \tan x\]
\tan \left(x + \varepsilon\right) - \tan x
\tan \left(x + \varepsilon\right) - \tan x
double code(double x, double eps) {
	return ((double) (((double) tan(((double) (x + eps)))) - ((double) tan(x))));
}
double code(double x, double eps) {
	return ((double) (((double) tan(((double) (x + eps)))) - ((double) tan(x))));
}

Error

Bits error versus x

Bits error versus eps

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 36.9

    \[\tan \left(x + \varepsilon\right) - \tan x\]
  2. Final simplification36.9

    \[\leadsto \tan \left(x + \varepsilon\right) - \tan x\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x eps)
  :name "(- (tan (+ x eps)) (tan x))"
  :precision binary64
  (- (tan (+ x eps)) (tan x)))