Average Error: 13.1 → 0.2
Time: 37.1s
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{\frac{\tan y + \tan z}{\sqrt[3]{1 - \tan z \cdot \tan y} \cdot \sqrt[3]{1 - \tan z \cdot \tan y}}}{\sqrt[3]{1 - \tan z \cdot \tan y}} - \tan a\right) + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\left(\frac{\frac{\tan y + \tan z}{\sqrt[3]{1 - \tan z \cdot \tan y} \cdot \sqrt[3]{1 - \tan z \cdot \tan y}}}{\sqrt[3]{1 - \tan z \cdot \tan y}} - \tan a\right) + x
double f(double x, double y, double z, double a) {
        double r6171589 = x;
        double r6171590 = y;
        double r6171591 = z;
        double r6171592 = r6171590 + r6171591;
        double r6171593 = tan(r6171592);
        double r6171594 = a;
        double r6171595 = tan(r6171594);
        double r6171596 = r6171593 - r6171595;
        double r6171597 = r6171589 + r6171596;
        return r6171597;
}

double f(double x, double y, double z, double a) {
        double r6171598 = y;
        double r6171599 = tan(r6171598);
        double r6171600 = z;
        double r6171601 = tan(r6171600);
        double r6171602 = r6171599 + r6171601;
        double r6171603 = 1.0;
        double r6171604 = r6171601 * r6171599;
        double r6171605 = r6171603 - r6171604;
        double r6171606 = cbrt(r6171605);
        double r6171607 = r6171606 * r6171606;
        double r6171608 = r6171602 / r6171607;
        double r6171609 = r6171608 / r6171606;
        double r6171610 = a;
        double r6171611 = tan(r6171610);
        double r6171612 = r6171609 - r6171611;
        double r6171613 = x;
        double r6171614 = r6171612 + r6171613;
        return r6171614;
}

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

    \[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 add-cube-cbrt0.2

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

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

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

Reproduce

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