Average Error: 0.3 → 0.4
Time: 5.8s
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) (((double) (1.0 - ((double) (((double) (((double) tan(x)) * ((double) sin(x)))) / ((double) cos(x)))))) / ((double) (1.0 + ((double) (((double) tan(x)) * ((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.3

    \[\]
  2. Using strategy rm
  3. Applied tan-quot0.4

    \[\leadsto \]
  4. Applied associate-*r/0.4

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

    \[\leadsto \]

Reproduce

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