Average Error: 0.3 → 0.4
Time: 6.3s
Precision: binary64
\[\]
\[\]
double code(double x) {
	return ((double) (((double) (1.0 - ((double) (((double) tan(x)) * ((double) tan(x)))))) / ((double) (1.0 + ((double) (((double) tan(x)) * ((double) tan(x))))))));
}
double code(double x) {
	return ((double) (1.0 / ((double) (((double) (((double) pow(((double) tan(x)), 2.0)) + 1.0)) / ((double) (1.0 - ((double) pow(((double) tan(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.3

    \[\]
  2. Using strategy rm
  3. Applied clear-num0.4

    \[\leadsto \]
  4. Simplified0.4

    \[\leadsto \]
  5. Final simplification0.4

    \[\leadsto \]

Reproduce

herbie shell --seed 2020181 
(FPCore (x)
  :name "Trigonometry B"
  :precision binary64
  (/ (- 1.0 (* (tan x) (tan x))) (+ 1.0 (* (tan x) (tan x)))))