Average Error: 13.0 → 0.2
Time: 29.5s
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)\]
\[x + \left(\frac{1}{1 - \frac{\sin z \cdot \sin y}{\cos y \cdot \cos z}} \cdot \left(\tan y + \tan z\right) - \tan a\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \left(\frac{1}{1 - \frac{\sin z \cdot \sin y}{\cos y \cdot \cos z}} \cdot \left(\tan y + \tan z\right) - \tan a\right)
double f(double x, double y, double z, double a) {
        double r3849673 = x;
        double r3849674 = y;
        double r3849675 = z;
        double r3849676 = r3849674 + r3849675;
        double r3849677 = tan(r3849676);
        double r3849678 = a;
        double r3849679 = tan(r3849678);
        double r3849680 = r3849677 - r3849679;
        double r3849681 = r3849673 + r3849680;
        return r3849681;
}

double f(double x, double y, double z, double a) {
        double r3849682 = x;
        double r3849683 = 1.0;
        double r3849684 = z;
        double r3849685 = sin(r3849684);
        double r3849686 = y;
        double r3849687 = sin(r3849686);
        double r3849688 = r3849685 * r3849687;
        double r3849689 = cos(r3849686);
        double r3849690 = cos(r3849684);
        double r3849691 = r3849689 * r3849690;
        double r3849692 = r3849688 / r3849691;
        double r3849693 = r3849683 - r3849692;
        double r3849694 = r3849683 / r3849693;
        double r3849695 = tan(r3849686);
        double r3849696 = tan(r3849684);
        double r3849697 = r3849695 + r3849696;
        double r3849698 = r3849694 * r3849697;
        double r3849699 = a;
        double r3849700 = tan(r3849699);
        double r3849701 = r3849698 - r3849700;
        double r3849702 = r3849682 + r3849701;
        return r3849702;
}

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

    \[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. Using strategy rm
  6. Applied div-inv0.2

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

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

Reproduce

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