Average Error: 13.1 → 0.2
Time: 1.2m
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{\tan y + \tan z}{1 - \log \left(e^{\sqrt[3]{\left(\left(\tan z \cdot \tan z\right) \cdot \left(\tan y \cdot \tan y\right)\right) \cdot \left(\tan z \cdot \tan y\right)}}\right)} - \tan a\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \left(\frac{\tan y + \tan z}{1 - \log \left(e^{\sqrt[3]{\left(\left(\tan z \cdot \tan z\right) \cdot \left(\tan y \cdot \tan y\right)\right) \cdot \left(\tan z \cdot \tan y\right)}}\right)} - \tan a\right)
double f(double x, double y, double z, double a) {
        double r41384323 = x;
        double r41384324 = y;
        double r41384325 = z;
        double r41384326 = r41384324 + r41384325;
        double r41384327 = tan(r41384326);
        double r41384328 = a;
        double r41384329 = tan(r41384328);
        double r41384330 = r41384327 - r41384329;
        double r41384331 = r41384323 + r41384330;
        return r41384331;
}

double f(double x, double y, double z, double a) {
        double r41384332 = x;
        double r41384333 = y;
        double r41384334 = tan(r41384333);
        double r41384335 = z;
        double r41384336 = tan(r41384335);
        double r41384337 = r41384334 + r41384336;
        double r41384338 = 1.0;
        double r41384339 = r41384336 * r41384336;
        double r41384340 = r41384334 * r41384334;
        double r41384341 = r41384339 * r41384340;
        double r41384342 = r41384336 * r41384334;
        double r41384343 = r41384341 * r41384342;
        double r41384344 = cbrt(r41384343);
        double r41384345 = exp(r41384344);
        double r41384346 = log(r41384345);
        double r41384347 = r41384338 - r41384346;
        double r41384348 = r41384337 / r41384347;
        double r41384349 = a;
        double r41384350 = tan(r41384349);
        double r41384351 = r41384348 - r41384350;
        double r41384352 = r41384332 + r41384351;
        return r41384352;
}

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-log-exp0.2

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

    \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \log \left(e^{\tan y \cdot \color{blue}{\sqrt[3]{\left(\tan z \cdot \tan z\right) \cdot \tan z}}}\right)} - \tan a\right)\]
  8. Applied add-cbrt-cube0.2

    \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \log \left(e^{\color{blue}{\sqrt[3]{\left(\tan y \cdot \tan y\right) \cdot \tan y}} \cdot \sqrt[3]{\left(\tan z \cdot \tan z\right) \cdot \tan z}}\right)} - \tan a\right)\]
  9. Applied cbrt-unprod0.2

    \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \log \left(e^{\color{blue}{\sqrt[3]{\left(\left(\tan y \cdot \tan y\right) \cdot \tan y\right) \cdot \left(\left(\tan z \cdot \tan z\right) \cdot \tan z\right)}}}\right)} - \tan a\right)\]
  10. Simplified0.2

    \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \log \left(e^{\sqrt[3]{\color{blue}{\left(\left(\tan z \cdot \tan y\right) \cdot \left(\tan z \cdot \tan y\right)\right) \cdot \left(\tan z \cdot \tan y\right)}}}\right)} - \tan a\right)\]
  11. Using strategy rm
  12. Applied swap-sqr0.2

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

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

Reproduce

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