Average Error: 26.9 → 0.5
Time: 25.1s
Precision: 64
\[\tan 1 + \tan \left(x + 1\right)\]
\[\frac{\frac{\sin x}{\cos x} + \frac{\sin 1}{\cos 1}}{1 - \frac{\frac{\sin 1}{\cos 1} \cdot \sin x}{\cos x}} + \tan 1\]
\tan 1 + \tan \left(x + 1\right)
\frac{\frac{\sin x}{\cos x} + \frac{\sin 1}{\cos 1}}{1 - \frac{\frac{\sin 1}{\cos 1} \cdot \sin x}{\cos x}} + \tan 1
double f(double x) {
        double r56361194 = 1.0;
        double r56361195 = tan(r56361194);
        double r56361196 = x;
        double r56361197 = r56361196 + r56361194;
        double r56361198 = tan(r56361197);
        double r56361199 = r56361195 + r56361198;
        return r56361199;
}

double f(double x) {
        double r56361200 = x;
        double r56361201 = sin(r56361200);
        double r56361202 = cos(r56361200);
        double r56361203 = r56361201 / r56361202;
        double r56361204 = 1.0;
        double r56361205 = sin(r56361204);
        double r56361206 = cos(r56361204);
        double r56361207 = r56361205 / r56361206;
        double r56361208 = r56361203 + r56361207;
        double r56361209 = r56361207 * r56361201;
        double r56361210 = r56361209 / r56361202;
        double r56361211 = r56361204 - r56361210;
        double r56361212 = r56361208 / r56361211;
        double r56361213 = tan(r56361204);
        double r56361214 = r56361212 + r56361213;
        return r56361214;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 26.9

    \[\tan 1 + \tan \left(x + 1\right)\]
  2. Using strategy rm
  3. Applied tan-sum0.5

    \[\leadsto \tan 1 + \color{blue}{\frac{\tan x + \tan 1}{1 - \tan x \cdot \tan 1}}\]
  4. Taylor expanded around inf 0.5

    \[\leadsto \tan 1 + \color{blue}{\frac{\frac{\sin x}{\cos x} + \frac{\sin 1}{\cos 1}}{1 - \frac{\sin 1 \cdot \sin x}{\cos 1 \cdot \cos x}}}\]
  5. Simplified0.5

    \[\leadsto \tan 1 + \color{blue}{\frac{\frac{\sin x}{\cos x} + \frac{\sin 1}{\cos 1}}{1 - \frac{\sin x \cdot \frac{\sin 1}{\cos 1}}{\cos x}}}\]
  6. Final simplification0.5

    \[\leadsto \frac{\frac{\sin x}{\cos x} + \frac{\sin 1}{\cos 1}}{1 - \frac{\frac{\sin 1}{\cos 1} \cdot \sin x}{\cos x}} + \tan 1\]

Reproduce

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