Average Error: 37.0 → 37.0
Time: 3.1s
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 37.0

    \[\tan \left(x + \varepsilon\right) - \tan x\]
  2. Final simplification37.0

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

Reproduce

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