Average Error: 13.3 → 0.2
Time: 47.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{\tan y + \tan z}{1 - \left(\sqrt[3]{\tan z \cdot \tan y} \cdot \sqrt[3]{\tan z \cdot \tan y}\right) \cdot \sqrt[3]{\tan z \cdot \tan y}} - \tan a\right) + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\left(\frac{\tan y + \tan z}{1 - \left(\sqrt[3]{\tan z \cdot \tan y} \cdot \sqrt[3]{\tan z \cdot \tan y}\right) \cdot \sqrt[3]{\tan z \cdot \tan y}} - \tan a\right) + x
double f(double x, double y, double z, double a) {
        double r4280666 = x;
        double r4280667 = y;
        double r4280668 = z;
        double r4280669 = r4280667 + r4280668;
        double r4280670 = tan(r4280669);
        double r4280671 = a;
        double r4280672 = tan(r4280671);
        double r4280673 = r4280670 - r4280672;
        double r4280674 = r4280666 + r4280673;
        return r4280674;
}

double f(double x, double y, double z, double a) {
        double r4280675 = y;
        double r4280676 = tan(r4280675);
        double r4280677 = z;
        double r4280678 = tan(r4280677);
        double r4280679 = r4280676 + r4280678;
        double r4280680 = 1.0;
        double r4280681 = r4280678 * r4280676;
        double r4280682 = cbrt(r4280681);
        double r4280683 = r4280682 * r4280682;
        double r4280684 = r4280683 * r4280682;
        double r4280685 = r4280680 - r4280684;
        double r4280686 = r4280679 / r4280685;
        double r4280687 = a;
        double r4280688 = tan(r4280687);
        double r4280689 = r4280686 - r4280688;
        double r4280690 = x;
        double r4280691 = r4280689 + r4280690;
        return r4280691;
}

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

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

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

Reproduce

herbie shell --seed 2019139 +o rules:numerics
(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))))