Average Error: 13.4 → 0.2
Time: 21.5s
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)\]
\[\frac{\left(\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a\right) \cdot \left(\left(1 + \frac{\sin y \cdot \tan z}{\cos y} \cdot \frac{\sin y \cdot \tan z}{\cos y}\right) + \frac{\sin y \cdot \tan z}{\cos y}\right)}{\left({1}^{3} - \frac{{\left(\sin y\right)}^{3}}{{\left(\cos y\right)}^{2}} \cdot \frac{{\left(\tan z\right)}^{3}}{\cos y}\right) \cdot \cos a} + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\frac{\left(\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a\right) \cdot \left(\left(1 + \frac{\sin y \cdot \tan z}{\cos y} \cdot \frac{\sin y \cdot \tan z}{\cos y}\right) + \frac{\sin y \cdot \tan z}{\cos y}\right)}{\left({1}^{3} - \frac{{\left(\sin y\right)}^{3}}{{\left(\cos y\right)}^{2}} \cdot \frac{{\left(\tan z\right)}^{3}}{\cos y}\right) \cdot \cos a} + x
double f(double x, double y, double z, double a) {
        double r152133 = x;
        double r152134 = y;
        double r152135 = z;
        double r152136 = r152134 + r152135;
        double r152137 = tan(r152136);
        double r152138 = a;
        double r152139 = tan(r152138);
        double r152140 = r152137 - r152139;
        double r152141 = r152133 + r152140;
        return r152141;
}

double f(double x, double y, double z, double a) {
        double r152142 = y;
        double r152143 = tan(r152142);
        double r152144 = z;
        double r152145 = tan(r152144);
        double r152146 = r152143 + r152145;
        double r152147 = a;
        double r152148 = cos(r152147);
        double r152149 = r152146 * r152148;
        double r152150 = 1.0;
        double r152151 = r152143 * r152145;
        double r152152 = r152150 - r152151;
        double r152153 = sin(r152147);
        double r152154 = r152152 * r152153;
        double r152155 = r152149 - r152154;
        double r152156 = sin(r152142);
        double r152157 = r152156 * r152145;
        double r152158 = cos(r152142);
        double r152159 = r152157 / r152158;
        double r152160 = r152159 * r152159;
        double r152161 = r152150 + r152160;
        double r152162 = r152161 + r152159;
        double r152163 = r152155 * r152162;
        double r152164 = 3.0;
        double r152165 = pow(r152150, r152164);
        double r152166 = pow(r152156, r152164);
        double r152167 = 2.0;
        double r152168 = pow(r152158, r152167);
        double r152169 = r152166 / r152168;
        double r152170 = pow(r152145, r152164);
        double r152171 = r152170 / r152158;
        double r152172 = r152169 * r152171;
        double r152173 = r152165 - r152172;
        double r152174 = r152173 * r152148;
        double r152175 = r152163 / r152174;
        double r152176 = x;
        double r152177 = r152175 + r152176;
        return r152177;
}

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

    \[x + \left(\tan \left(y + z\right) - \tan a\right)\]
  2. Using strategy rm
  3. Applied tan-quot13.4

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

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

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

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

    \[\leadsto x + \frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\left(1 - \color{blue}{\frac{\sin y \cdot \tan z}{\cos y}}\right) \cdot \cos a}\]
  9. Using strategy rm
  10. Applied flip3--0.2

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

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

    \[\leadsto x + \color{blue}{\frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\left({1}^{3} - {\left(\frac{\sin y \cdot \tan z}{\cos y}\right)}^{3}\right) \cdot \cos a} \cdot \left(1 \cdot 1 + \left(\frac{\sin y \cdot \tan z}{\cos y} \cdot \frac{\sin y \cdot \tan z}{\cos y} + 1 \cdot \frac{\sin y \cdot \tan z}{\cos y}\right)\right)}\]
  13. Using strategy rm
  14. Applied add-cube-cbrt0.3

    \[\leadsto x + \frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\left({1}^{3} - {\left(\frac{\sin y \cdot \tan z}{\color{blue}{\left(\sqrt[3]{\cos y} \cdot \sqrt[3]{\cos y}\right) \cdot \sqrt[3]{\cos y}}}\right)}^{3}\right) \cdot \cos a} \cdot \left(1 \cdot 1 + \left(\frac{\sin y \cdot \tan z}{\cos y} \cdot \frac{\sin y \cdot \tan z}{\cos y} + 1 \cdot \frac{\sin y \cdot \tan z}{\cos y}\right)\right)\]
  15. Applied times-frac0.3

    \[\leadsto x + \frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\left({1}^{3} - {\color{blue}{\left(\frac{\sin y}{\sqrt[3]{\cos y} \cdot \sqrt[3]{\cos y}} \cdot \frac{\tan z}{\sqrt[3]{\cos y}}\right)}}^{3}\right) \cdot \cos a} \cdot \left(1 \cdot 1 + \left(\frac{\sin y \cdot \tan z}{\cos y} \cdot \frac{\sin y \cdot \tan z}{\cos y} + 1 \cdot \frac{\sin y \cdot \tan z}{\cos y}\right)\right)\]
  16. Applied unpow-prod-down0.3

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

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

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

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

Reproduce

herbie shell --seed 2019304 
(FPCore (x y z a)
  :name "(+ x (- (tan (+ y z)) (tan a)))"
  :precision binary64
  :pre (and (or (== x 0.0) (<= 0.588414199999999998 x 505.590899999999976)) (or (<= -1.79665800000000009e308 y -9.425585000000013e-310) (<= 1.284938e-309 y 1.75122399999999993e308)) (or (<= -1.776707e308 z -8.59979600000002e-310) (<= 3.29314499999998e-311 z 1.72515400000000009e308)) (or (<= -1.79665800000000009e308 a -9.425585000000013e-310) (<= 1.284938e-309 a 1.75122399999999993e308)))
  (+ x (- (tan (+ y z)) (tan a))))