Average Error: 0.4 → 0.4
Time: 1.5s
Precision: binary64
\[\frac{2 \cdot \tan a}{1 - \tan a \cdot \tan a}\]
\[\frac{2 \cdot \tan a}{1 - \tan a \cdot \tan a}\]
\frac{2 \cdot \tan a}{1 - \tan a \cdot \tan a}
\frac{2 \cdot \tan a}{1 - \tan a \cdot \tan a}
double code(double a) {
	return ((double) (((double) (2.0 * ((double) tan(a)))) / ((double) (1.0 - ((double) (((double) tan(a)) * ((double) tan(a))))))));
}
double code(double a) {
	return ((double) (((double) (2.0 * ((double) tan(a)))) / ((double) (1.0 - ((double) (((double) tan(a)) * ((double) tan(a))))))));
}

Error

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.4

    \[\frac{2 \cdot \tan a}{1 - \tan a \cdot \tan a}\]
  2. Final simplification0.4

    \[\leadsto \frac{2 \cdot \tan a}{1 - \tan a \cdot \tan a}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (a)
  :name "(/ (* 2 (tan a)) (- 1 (* (tan a) (tan a))))"
  :precision binary64
  (/ (* 2.0 (tan a)) (- 1.0 (* (tan a) (tan a)))))