Average Error: 29.6 → 0.3
Time: 20.7s
Precision: 64
\[\tan \left(x + 1\right) - \tan x\]
\[\frac{\tan x + \tan 1}{1 - \sqrt{\tan 1} \cdot \left(\sqrt{\tan 1} \cdot \tan x\right)} - \tan x\]
\tan \left(x + 1\right) - \tan x
\frac{\tan x + \tan 1}{1 - \sqrt{\tan 1} \cdot \left(\sqrt{\tan 1} \cdot \tan x\right)} - \tan x
double f(double x) {
        double r6569590 = x;
        double r6569591 = 1.0;
        double r6569592 = r6569590 + r6569591;
        double r6569593 = tan(r6569592);
        double r6569594 = tan(r6569590);
        double r6569595 = r6569593 - r6569594;
        return r6569595;
}

double f(double x) {
        double r6569596 = x;
        double r6569597 = tan(r6569596);
        double r6569598 = 1.0;
        double r6569599 = tan(r6569598);
        double r6569600 = r6569597 + r6569599;
        double r6569601 = 1.0;
        double r6569602 = sqrt(r6569599);
        double r6569603 = r6569602 * r6569597;
        double r6569604 = r6569602 * r6569603;
        double r6569605 = r6569601 - r6569604;
        double r6569606 = r6569600 / r6569605;
        double r6569607 = r6569606 - r6569597;
        return r6569607;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 29.6

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

    \[\leadsto \color{blue}{\frac{\tan x + \tan 1}{1 - \tan x \cdot \tan 1}} - \tan x\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.3

    \[\leadsto \frac{\tan x + \tan 1}{1 - \tan x \cdot \color{blue}{\left(\sqrt{\tan 1} \cdot \sqrt{\tan 1}\right)}} - \tan x\]
  6. Applied associate-*r*0.3

    \[\leadsto \frac{\tan x + \tan 1}{1 - \color{blue}{\left(\tan x \cdot \sqrt{\tan 1}\right) \cdot \sqrt{\tan 1}}} - \tan x\]
  7. Final simplification0.3

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

Reproduce

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