\frac{1 - \tan x \cdot \tan x}{1 + \tan x \cdot \tan x}\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\left(\sqrt{1} + \tan x\right) \cdot \left(\sqrt{1} - \tan x\right)}{\mathsf{fma}\left(\tan x, \tan x, 1\right)}\right)\right)double f(double x) {
double r23451 = 1.0;
double r23452 = x;
double r23453 = tan(r23452);
double r23454 = r23453 * r23453;
double r23455 = r23451 - r23454;
double r23456 = r23451 + r23454;
double r23457 = r23455 / r23456;
return r23457;
}
double f(double x) {
double r23458 = 1.0;
double r23459 = sqrt(r23458);
double r23460 = x;
double r23461 = tan(r23460);
double r23462 = r23459 + r23461;
double r23463 = r23459 - r23461;
double r23464 = r23462 * r23463;
double r23465 = fma(r23461, r23461, r23458);
double r23466 = r23464 / r23465;
double r23467 = log1p(r23466);
double r23468 = expm1(r23467);
return r23468;
}



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