\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\frac{1}{\mathsf{fma}\left(\tan x, \tan x, 1\right)} - \frac{1}{\mathsf{fma}\left(\tan x, \tan x, 1\right)} \cdot \left(\tan x \cdot \tan x\right)double f(double x) {
double r21801 = 1.0;
double r21802 = x;
double r21803 = tan(r21802);
double r21804 = r21803 * r21803;
double r21805 = r21801 - r21804;
double r21806 = r21801 + r21804;
double r21807 = r21805 / r21806;
return r21807;
}
double f(double x) {
double r21808 = 1.0;
double r21809 = x;
double r21810 = tan(r21809);
double r21811 = fma(r21810, r21810, r21808);
double r21812 = r21808 / r21811;
double r21813 = 1.0;
double r21814 = r21813 / r21811;
double r21815 = r21810 * r21810;
double r21816 = r21814 * r21815;
double r21817 = r21812 - r21816;
return r21817;
}



Bits error versus x
Initial program 0.3
rmApplied div-sub0.4
Simplified0.4
Simplified0.4
rmApplied div-inv0.5
Applied *-un-lft-identity0.5
Applied times-frac0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2020002 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))