\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1}{\frac{\mathsf{fma}\left(\tan x, \tan x, 1\right)}{1 - \frac{\tan x \cdot \sin x}{\cos x}}}double f(double x) {
double r10819 = 1.0;
double r10820 = x;
double r10821 = tan(r10820);
double r10822 = r10821 * r10821;
double r10823 = r10819 - r10822;
double r10824 = r10819 + r10822;
double r10825 = r10823 / r10824;
return r10825;
}
double f(double x) {
double r10826 = 1.0;
double r10827 = x;
double r10828 = tan(r10827);
double r10829 = 1.0;
double r10830 = fma(r10828, r10828, r10829);
double r10831 = sin(r10827);
double r10832 = r10828 * r10831;
double r10833 = cos(r10827);
double r10834 = r10832 / r10833;
double r10835 = r10829 - r10834;
double r10836 = r10830 / r10835;
double r10837 = r10826 / r10836;
return r10837;
}



Bits error versus x
Initial program 0.3
rmApplied clear-num0.4
Simplified0.4
rmApplied tan-quot0.4
Applied associate-*r/0.4
Final simplification0.4
herbie shell --seed 2020083 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))