Average Error: 13.3 → 0.2
Time: 31.6s
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)\]
\[\left(\frac{\tan y + \tan z}{1 - \frac{\sin z \cdot \tan y}{\cos z}} - \tan a\right) + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\left(\frac{\tan y + \tan z}{1 - \frac{\sin z \cdot \tan y}{\cos z}} - \tan a\right) + x
double f(double x, double y, double z, double a) {
        double r4032515 = x;
        double r4032516 = y;
        double r4032517 = z;
        double r4032518 = r4032516 + r4032517;
        double r4032519 = tan(r4032518);
        double r4032520 = a;
        double r4032521 = tan(r4032520);
        double r4032522 = r4032519 - r4032521;
        double r4032523 = r4032515 + r4032522;
        return r4032523;
}

double f(double x, double y, double z, double a) {
        double r4032524 = y;
        double r4032525 = tan(r4032524);
        double r4032526 = z;
        double r4032527 = tan(r4032526);
        double r4032528 = r4032525 + r4032527;
        double r4032529 = 1.0;
        double r4032530 = sin(r4032526);
        double r4032531 = r4032530 * r4032525;
        double r4032532 = cos(r4032526);
        double r4032533 = r4032531 / r4032532;
        double r4032534 = r4032529 - r4032533;
        double r4032535 = r4032528 / r4032534;
        double r4032536 = a;
        double r4032537 = tan(r4032536);
        double r4032538 = r4032535 - r4032537;
        double r4032539 = x;
        double r4032540 = r4032538 + r4032539;
        return r4032540;
}

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.3

    \[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. Final simplification0.2

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

Reproduce

herbie shell --seed 2019130 
(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))))