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;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

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
  5. Applied add-log-exp0.5

    \[\leadsto \frac{\tan x + \tan 1}{1 - \color{blue}{\log \left(e^{\tan x \cdot \tan 1}\right)}} + 1\]
  6. Final simplification0.5

    \[\leadsto 1 + \frac{\tan x + \tan 1}{1 - \log \left(e^{\tan 1 \cdot \tan x}\right)}\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "tan(x+1)+1"
  (+ (tan (+ x 1.0)) 1.0))