\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\mathsf{expm1}\left(\log \left(e^{\mathsf{log1p}\left(\frac{\mathsf{fma}\left(-\tan x, \tan x, 1\right)}{\mathsf{fma}\left(\tan x, \tan x, 1\right)}\right)}\right)\right)double f(double x) {
double r19882 = 1.0;
double r19883 = x;
double r19884 = tan(r19883);
double r19885 = r19884 * r19884;
double r19886 = r19882 - r19885;
double r19887 = r19882 + r19885;
double r19888 = r19886 / r19887;
return r19888;
}
double f(double x) {
double r19889 = x;
double r19890 = tan(r19889);
double r19891 = -r19890;
double r19892 = 1.0;
double r19893 = fma(r19891, r19890, r19892);
double r19894 = fma(r19890, r19890, r19892);
double r19895 = r19893 / r19894;
double r19896 = log1p(r19895);
double r19897 = exp(r19896);
double r19898 = log(r19897);
double r19899 = expm1(r19898);
return r19899;
}



Bits error versus x
Initial program 0.3
Simplified0.3
rmApplied *-un-lft-identity0.3
Applied associate-/r*0.3
Simplified0.3
rmApplied expm1-log1p-u0.4
rmApplied add-log-exp0.4
Final simplification0.4
herbie shell --seed 2019306 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))