Average Error: 13.1 → 0.2
Time: 34.3s
Precision: 64
\[\left(x = 0.0 \lor 0.5884141999999999983472775966220069676638 \le x \le 505.5908999999999764440872240811586380005\right) \land \left(-1.7966580000000000931214523812968299911 \cdot 10^{308} \le y \le -9.425585000000013069597555966781986720373 \cdot 10^{-310} \lor 1.284937999999999548796432976649400331091 \cdot 10^{-309} \le y \le 1.751223999999999928063201074847742204824 \cdot 10^{308}\right) \land \left(-1.776707000000000001259808757982040817204 \cdot 10^{308} \le z \le -8.599796000000016667475923823712126825539 \cdot 10^{-310} \lor 3.293144999999983071955117582595641261776 \cdot 10^{-311} \le z \le 1.725154000000000087891269878141591702413 \cdot 10^{308}\right) \land \left(-1.7966580000000000931214523812968299911 \cdot 10^{308} \le a \le -9.425585000000013069597555966781986720373 \cdot 10^{-310} \lor 1.284937999999999548796432976649400331091 \cdot 10^{-309} \le a \le 1.751223999999999928063201074847742204824 \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 r4247540 = x;
        double r4247541 = y;
        double r4247542 = z;
        double r4247543 = r4247541 + r4247542;
        double r4247544 = tan(r4247543);
        double r4247545 = a;
        double r4247546 = tan(r4247545);
        double r4247547 = r4247544 - r4247546;
        double r4247548 = r4247540 + r4247547;
        return r4247548;
}

double f(double x, double y, double z, double a) {
        double r4247549 = y;
        double r4247550 = tan(r4247549);
        double r4247551 = z;
        double r4247552 = tan(r4247551);
        double r4247553 = r4247550 + r4247552;
        double r4247554 = 1.0;
        double r4247555 = r4247552 * r4247550;
        double r4247556 = cbrt(r4247555);
        double r4247557 = r4247556 * r4247556;
        double r4247558 = r4247557 * r4247556;
        double r4247559 = r4247554 - r4247558;
        double r4247560 = r4247553 / r4247559;
        double r4247561 = a;
        double r4247562 = tan(r4247561);
        double r4247563 = r4247560 - r4247562;
        double r4247564 = x;
        double r4247565 = r4247563 + r4247564;
        return r4247565;
}

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}{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 2019174 +o rules:numerics
(FPCore (x y z a)
  :name "(+ x (- (tan (+ y z)) (tan a)))"
  :pre (and (or (== x 0.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))))