Average Error: 13.1 → 0.2
Time: 55.8s
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 z + \tan y}{1 - \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) + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\left(\frac{\tan z + \tan y}{1 - \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) + x
double f(double x, double y, double z, double a) {
        double r223241 = x;
        double r223242 = y;
        double r223243 = z;
        double r223244 = r223242 + r223243;
        double r223245 = tan(r223244);
        double r223246 = a;
        double r223247 = tan(r223246);
        double r223248 = r223245 - r223247;
        double r223249 = r223241 + r223248;
        return r223249;
}

double f(double x, double y, double z, double a) {
        double r223250 = z;
        double r223251 = tan(r223250);
        double r223252 = y;
        double r223253 = tan(r223252);
        double r223254 = r223251 + r223253;
        double r223255 = 1.0;
        double r223256 = r223253 * r223251;
        double r223257 = cbrt(r223256);
        double r223258 = r223257 * r223257;
        double r223259 = r223258 * r223257;
        double r223260 = r223255 - r223259;
        double r223261 = r223254 / r223260;
        double r223262 = a;
        double r223263 = tan(r223262);
        double r223264 = r223261 - r223263;
        double r223265 = x;
        double r223266 = r223264 + r223265;
        return r223266;
}

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. Simplified0.2

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

    \[\leadsto x + \left(\frac{\tan z + \tan y}{\color{blue}{1 - \tan z \cdot \tan y}} - \tan a\right)\]
  6. Using strategy rm
  7. Applied add-cube-cbrt0.2

    \[\leadsto x + \left(\frac{\tan z + \tan y}{1 - \color{blue}{\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)\]
  8. Final simplification0.2

    \[\leadsto \left(\frac{\tan z + \tan y}{1 - \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) + 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))))