Average Error: 13.3 → 0.2
Time: 29.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)\]
\[\left(\frac{\cos z \cdot \sin y + \sin z \cdot \cos y}{\left(\cos y \cdot \cos z\right) \cdot \left(1 - \tan y \cdot \tan z\right)} - \tan a\right) + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\left(\frac{\cos z \cdot \sin y + \sin z \cdot \cos y}{\left(\cos y \cdot \cos z\right) \cdot \left(1 - \tan y \cdot \tan z\right)} - \tan a\right) + x
double f(double x, double y, double z, double a) {
        double r2235175 = x;
        double r2235176 = y;
        double r2235177 = z;
        double r2235178 = r2235176 + r2235177;
        double r2235179 = tan(r2235178);
        double r2235180 = a;
        double r2235181 = tan(r2235180);
        double r2235182 = r2235179 - r2235181;
        double r2235183 = r2235175 + r2235182;
        return r2235183;
}

double f(double x, double y, double z, double a) {
        double r2235184 = z;
        double r2235185 = cos(r2235184);
        double r2235186 = y;
        double r2235187 = sin(r2235186);
        double r2235188 = r2235185 * r2235187;
        double r2235189 = sin(r2235184);
        double r2235190 = cos(r2235186);
        double r2235191 = r2235189 * r2235190;
        double r2235192 = r2235188 + r2235191;
        double r2235193 = r2235190 * r2235185;
        double r2235194 = 1.0;
        double r2235195 = tan(r2235186);
        double r2235196 = tan(r2235184);
        double r2235197 = r2235195 * r2235196;
        double r2235198 = r2235194 - r2235197;
        double r2235199 = r2235193 * r2235198;
        double r2235200 = r2235192 / r2235199;
        double r2235201 = a;
        double r2235202 = tan(r2235201);
        double r2235203 = r2235200 - r2235202;
        double r2235204 = x;
        double r2235205 = r2235203 + r2235204;
        return r2235205;
}

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 tan-quot0.2

    \[\leadsto x + \left(\frac{\tan y + \color{blue}{\frac{\sin z}{\cos z}}}{1 - \tan y \cdot \tan z} - \tan a\right)\]
  6. Applied tan-quot0.2

    \[\leadsto x + \left(\frac{\color{blue}{\frac{\sin y}{\cos y}} + \frac{\sin z}{\cos z}}{1 - \tan y \cdot \tan z} - \tan a\right)\]
  7. Applied frac-add0.2

    \[\leadsto x + \left(\frac{\color{blue}{\frac{\sin y \cdot \cos z + \cos y \cdot \sin z}{\cos y \cdot \cos z}}}{1 - \tan y \cdot \tan z} - \tan a\right)\]
  8. Applied associate-/l/0.2

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

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

Reproduce

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