Average Error: 0.4 → 0.4
Time: 1.2s
Precision: binary64
\[\frac{1 + \tan x}{1 - \tan x}\]
\[\frac{1 + \tan x}{1 - \tan x}\]
\frac{1 + \tan x}{1 - \tan x}
\frac{1 + \tan x}{1 - \tan x}
double code(double x) {
	return ((double) (((double) (1.0 + ((double) tan(x)))) / ((double) (1.0 - ((double) tan(x))))));
}
double code(double x) {
	return ((double) (((double) (1.0 + ((double) tan(x)))) / ((double) (1.0 - ((double) tan(x))))));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.4

    \[\frac{1 + \tan x}{1 - \tan x}\]
  2. Final simplification0.4

    \[\leadsto \frac{1 + \tan x}{1 - \tan x}\]

Reproduce

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