Average Error: 27.7 → 0.5
Time: 17.8s
Precision: 64
$\tan \left(x + 1\right) + 1$
$1 + \frac{\tan x + \tan 1}{1 - \log \left(e^{\tan 1 \cdot \tan x}\right)}$
\tan \left(x + 1\right) + 1
1 + \frac{\tan x + \tan 1}{1 - \log \left(e^{\tan 1 \cdot \tan x}\right)}
double f(double x) {
double r43487306 = x;
double r43487307 = 1.0;
double r43487308 = r43487306 + r43487307;
double r43487309 = tan(r43487308);
double r43487310 = r43487309 + r43487307;
return r43487310;
}


double f(double x) {
double r43487311 = 1.0;
double r43487312 = x;
double r43487313 = tan(r43487312);
double r43487314 = tan(r43487311);
double r43487315 = r43487313 + r43487314;
double r43487316 = 1.0;
double r43487317 = r43487314 * r43487313;
double r43487318 = exp(r43487317);
double r43487319 = log(r43487318);
double r43487320 = r43487316 - r43487319;
double r43487321 = r43487315 / r43487320;
double r43487322 = r43487311 + r43487321;
return r43487322;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 27.7

$\tan \left(x + 1\right) + 1$
2. Using strategy rm
3. Applied tan-sum0.4

$\leadsto \color{blue}{\frac{\tan x + \tan 1}{1 - \tan x \cdot \tan 1}} + 1$
4. Using strategy rm
$\leadsto \frac{\tan x + \tan 1}{1 - \color{blue}{\log \left(e^{\tan x \cdot \tan 1}\right)}} + 1$
$\leadsto 1 + \frac{\tan x + \tan 1}{1 - \log \left(e^{\tan 1 \cdot \tan x}\right)}$
herbie shell --seed 1