Average Error: 13.3 → 0.2
Time: 34.0s
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{\tan z + \tan y}{1 - \frac{\left(\tan y \cdot \sin z\right) \cdot \left(\tan y \cdot \sin z\right)}{\cos z \cdot \cos z} \cdot \left(\tan y \cdot \tan z\right)} \cdot \left(\left(\tan y \cdot \tan z + \left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right)\right) + 1\right) - \tan a\right) + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\left(\frac{\tan z + \tan y}{1 - \frac{\left(\tan y \cdot \sin z\right) \cdot \left(\tan y \cdot \sin z\right)}{\cos z \cdot \cos z} \cdot \left(\tan y \cdot \tan z\right)} \cdot \left(\left(\tan y \cdot \tan z + \left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right)\right) + 1\right) - \tan a\right) + x
double f(double x, double y, double z, double a) {
        double r2078457 = x;
        double r2078458 = y;
        double r2078459 = z;
        double r2078460 = r2078458 + r2078459;
        double r2078461 = tan(r2078460);
        double r2078462 = a;
        double r2078463 = tan(r2078462);
        double r2078464 = r2078461 - r2078463;
        double r2078465 = r2078457 + r2078464;
        return r2078465;
}

double f(double x, double y, double z, double a) {
        double r2078466 = z;
        double r2078467 = tan(r2078466);
        double r2078468 = y;
        double r2078469 = tan(r2078468);
        double r2078470 = r2078467 + r2078469;
        double r2078471 = 1.0;
        double r2078472 = sin(r2078466);
        double r2078473 = r2078469 * r2078472;
        double r2078474 = r2078473 * r2078473;
        double r2078475 = cos(r2078466);
        double r2078476 = r2078475 * r2078475;
        double r2078477 = r2078474 / r2078476;
        double r2078478 = r2078469 * r2078467;
        double r2078479 = r2078477 * r2078478;
        double r2078480 = r2078471 - r2078479;
        double r2078481 = r2078470 / r2078480;
        double r2078482 = r2078478 * r2078478;
        double r2078483 = r2078478 + r2078482;
        double r2078484 = r2078483 + r2078471;
        double r2078485 = r2078481 * r2078484;
        double r2078486 = a;
        double r2078487 = tan(r2078486);
        double r2078488 = r2078485 - r2078487;
        double r2078489 = x;
        double r2078490 = r2078488 + r2078489;
        return r2078490;
}

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 flip3--0.2

    \[\leadsto x + \left(\frac{\tan y + \tan z}{\color{blue}{\frac{{1}^{3} - {\left(\tan y \cdot \tan z\right)}^{3}}{1 \cdot 1 + \left(\left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right) + 1 \cdot \left(\tan y \cdot \tan z\right)\right)}}} - \tan a\right)\]
  6. Applied associate-/r/0.2

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

    \[\leadsto x + \left(\color{blue}{\frac{\tan z + \tan y}{1 - \left(\tan y \cdot \tan z\right) \cdot \left(\left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right)\right)}} \cdot \left(1 \cdot 1 + \left(\left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right) + 1 \cdot \left(\tan y \cdot \tan z\right)\right)\right) - \tan a\right)\]
  8. Using strategy rm
  9. Applied tan-quot0.2

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

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

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

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

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

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

Reproduce

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