Average Error: 13.6 → 0.2
Time: 39.3s
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)\]
\[\log \left(e^{\frac{\tan y + \tan z}{1 - \tan z \cdot \tan y} - \tan a}\right) + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\log \left(e^{\frac{\tan y + \tan z}{1 - \tan z \cdot \tan y} - \tan a}\right) + x
double f(double x, double y, double z, double a) {
        double r7442537 = x;
        double r7442538 = y;
        double r7442539 = z;
        double r7442540 = r7442538 + r7442539;
        double r7442541 = tan(r7442540);
        double r7442542 = a;
        double r7442543 = tan(r7442542);
        double r7442544 = r7442541 - r7442543;
        double r7442545 = r7442537 + r7442544;
        return r7442545;
}

double f(double x, double y, double z, double a) {
        double r7442546 = y;
        double r7442547 = tan(r7442546);
        double r7442548 = z;
        double r7442549 = tan(r7442548);
        double r7442550 = r7442547 + r7442549;
        double r7442551 = 1.0;
        double r7442552 = r7442549 * r7442547;
        double r7442553 = r7442551 - r7442552;
        double r7442554 = r7442550 / r7442553;
        double r7442555 = a;
        double r7442556 = tan(r7442555);
        double r7442557 = r7442554 - r7442556;
        double r7442558 = exp(r7442557);
        double r7442559 = log(r7442558);
        double r7442560 = x;
        double r7442561 = r7442559 + r7442560;
        return r7442561;
}

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

    \[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 - \tan y \cdot \tan z} - \color{blue}{\log \left(e^{\tan a}\right)}\right)\]
  6. Applied add-log-exp0.2

    \[\leadsto x + \left(\color{blue}{\log \left(e^{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}}\right)} - \log \left(e^{\tan a}\right)\right)\]
  7. Applied diff-log0.2

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

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

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

Reproduce

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