\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{1 - \tan x \cdot \tan x}{\mathsf{fma}\left(\tan x, \tan x, 1\right)}\right)\right)double f(double x) {
double r22693 = 1.0;
double r22694 = x;
double r22695 = tan(r22694);
double r22696 = r22695 * r22695;
double r22697 = r22693 - r22696;
double r22698 = r22693 + r22696;
double r22699 = r22697 / r22698;
return r22699;
}
double f(double x) {
double r22700 = 1.0;
double r22701 = x;
double r22702 = tan(r22701);
double r22703 = r22702 * r22702;
double r22704 = r22700 - r22703;
double r22705 = fma(r22702, r22702, r22700);
double r22706 = r22704 / r22705;
double r22707 = log1p(r22706);
double r22708 = expm1(r22707);
return r22708;
}



Bits error versus x
Initial program 0.3
Simplified0.3
rmApplied expm1-log1p-u0.4
Final simplification0.4
herbie shell --seed 2019305 +o rules:numerics
(FPCore (x)
:name "Trigonometry B"
:precision binary64
(/ (- 1 (* (tan x) (tan x))) (+ 1 (* (tan x) (tan x)))))