Average Error: 13.2 → 0.3
Time: 40.3s
Precision: 64
\[\left(x = 0 \lor 0.5884142 \le x \le 505.5909\right) \land \left(-1.796658 \cdot 10^{+308} \le y \le -9.425585 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \le y \le 1.751224 \cdot 10^{+308}\right) \land \left(-1.776707 \cdot 10^{+308} \le z \le -8.599796 \cdot 10^{-310} \lor 3.293145 \cdot 10^{-311} \le z \le 1.725154 \cdot 10^{+308}\right) \land \left(-1.796658 \cdot 10^{+308} \le a \le -9.425585 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \le a \le 1.751224 \cdot 10^{+308}\right)\]
\[x + \left(\tan \left(y + z\right) - \tan a\right)\]
\[\log \left(e^{\left(\frac{\tan y + \tan z}{1 - \frac{\log \left(e^{\sin z \cdot \tan y}\right)}{\cos z}} - \tan a\right) + x}\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\log \left(e^{\left(\frac{\tan y + \tan z}{1 - \frac{\log \left(e^{\sin z \cdot \tan y}\right)}{\cos z}} - \tan a\right) + x}\right)
double f(double x, double y, double z, double a) {
        double r10976440 = x;
        double r10976441 = y;
        double r10976442 = z;
        double r10976443 = r10976441 + r10976442;
        double r10976444 = tan(r10976443);
        double r10976445 = a;
        double r10976446 = tan(r10976445);
        double r10976447 = r10976444 - r10976446;
        double r10976448 = r10976440 + r10976447;
        return r10976448;
}

double f(double x, double y, double z, double a) {
        double r10976449 = y;
        double r10976450 = tan(r10976449);
        double r10976451 = z;
        double r10976452 = tan(r10976451);
        double r10976453 = r10976450 + r10976452;
        double r10976454 = 1.0;
        double r10976455 = sin(r10976451);
        double r10976456 = r10976455 * r10976450;
        double r10976457 = exp(r10976456);
        double r10976458 = log(r10976457);
        double r10976459 = cos(r10976451);
        double r10976460 = r10976458 / r10976459;
        double r10976461 = r10976454 - r10976460;
        double r10976462 = r10976453 / r10976461;
        double r10976463 = a;
        double r10976464 = tan(r10976463);
        double r10976465 = r10976462 - r10976464;
        double r10976466 = x;
        double r10976467 = r10976465 + r10976466;
        double r10976468 = exp(r10976467);
        double r10976469 = log(r10976468);
        return r10976469;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 13.2

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

    \[\leadsto x + \left(\color{blue}{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}} - \tan a\right)\]
  4. Using strategy rm
  5. Applied tan-quot0.2

    \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \color{blue}{\frac{\sin z}{\cos z}}} - \tan a\right)\]
  6. Applied associate-*r/0.2

    \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \color{blue}{\frac{\tan y \cdot \sin z}{\cos z}}} - \tan a\right)\]
  7. Using strategy rm
  8. Applied add-log-exp0.2

    \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \frac{\color{blue}{\log \left(e^{\tan y \cdot \sin z}\right)}}{\cos z}} - \tan a\right)\]
  9. Using strategy rm
  10. Applied add-log-exp0.3

    \[\leadsto \color{blue}{\log \left(e^{x + \left(\frac{\tan y + \tan z}{1 - \frac{\log \left(e^{\tan y \cdot \sin z}\right)}{\cos z}} - \tan a\right)}\right)}\]
  11. Final simplification0.3

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

Reproduce

herbie shell --seed 2019107 
(FPCore (x y z a)
  :name "(+ x (- (tan (+ y z)) (tan a)))"
  :pre (and (or (== x 0) (<= 0.5884142 x 505.5909)) (or (<= -1.796658e+308 y -9.425585e-310) (<= 1.284938e-309 y 1.751224e+308)) (or (<= -1.776707e+308 z -8.599796e-310) (<= 3.293145e-311 z 1.725154e+308)) (or (<= -1.796658e+308 a -9.425585e-310) (<= 1.284938e-309 a 1.751224e+308)))
  (+ x (- (tan (+ y z)) (tan a))))