Average Error: 13.4 → 0.2
Time: 45.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)\]
\[\left(\frac{\tan y + \tan z}{1 - \frac{\sin z \cdot \sin y}{\cos y \cdot \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 \sin y}{\cos y \cdot \cos z}} - \tan a\right) + x
double f(double x, double y, double z, double a) {
        double r16829564 = x;
        double r16829565 = y;
        double r16829566 = z;
        double r16829567 = r16829565 + r16829566;
        double r16829568 = tan(r16829567);
        double r16829569 = a;
        double r16829570 = tan(r16829569);
        double r16829571 = r16829568 - r16829570;
        double r16829572 = r16829564 + r16829571;
        return r16829572;
}

double f(double x, double y, double z, double a) {
        double r16829573 = y;
        double r16829574 = tan(r16829573);
        double r16829575 = z;
        double r16829576 = tan(r16829575);
        double r16829577 = r16829574 + r16829576;
        double r16829578 = 1.0;
        double r16829579 = sin(r16829575);
        double r16829580 = sin(r16829573);
        double r16829581 = r16829579 * r16829580;
        double r16829582 = cos(r16829573);
        double r16829583 = cos(r16829575);
        double r16829584 = r16829582 * r16829583;
        double r16829585 = r16829581 / r16829584;
        double r16829586 = r16829578 - r16829585;
        double r16829587 = r16829577 / r16829586;
        double r16829588 = a;
        double r16829589 = tan(r16829588);
        double r16829590 = r16829587 - r16829589;
        double r16829591 = x;
        double r16829592 = r16829590 + r16829591;
        return r16829592;
}

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

    \[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. Taylor expanded around inf 0.2

    \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \color{blue}{\frac{\sin z \cdot \sin y}{\cos y \cdot \cos z}}} - \tan a\right)\]
  5. Final simplification0.2

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

Reproduce

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