Average Error: 28.5 → 0.5
Time: 17.7s
Precision: 64
\[\tan \left(x + 1\right)\]
\[\frac{\tan x + \tan 1}{\log \left(e^{1 - \tan 1 \cdot \tan x}\right)}\]
\tan \left(x + 1\right)
\frac{\tan x + \tan 1}{\log \left(e^{1 - \tan 1 \cdot \tan x}\right)}
double f(double x) {
        double r58469127 = x;
        double r58469128 = 1.0;
        double r58469129 = r58469127 + r58469128;
        double r58469130 = tan(r58469129);
        return r58469130;
}

double f(double x) {
        double r58469131 = x;
        double r58469132 = tan(r58469131);
        double r58469133 = 1.0;
        double r58469134 = tan(r58469133);
        double r58469135 = r58469132 + r58469134;
        double r58469136 = r58469134 * r58469132;
        double r58469137 = r58469133 - r58469136;
        double r58469138 = exp(r58469137);
        double r58469139 = log(r58469138);
        double r58469140 = r58469135 / r58469139;
        return r58469140;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 28.5

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

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

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

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

Reproduce

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