Average Error: 13.8 → 0.2
Time: 11.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.751224000000000127647232028319723370461 \cdot 10^{308}\right) \land \left(-1.776707000000000200843839711454021982841 \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.751224000000000127647232028319723370461 \cdot 10^{308}\right)\]
\[x + \left(\tan \left(y + z\right) - \tan a\right)\]
\[x + \left(\frac{\tan y + \tan z}{1 - {\left(\tan y \cdot \tan z\right)}^{3}} \cdot \left(1 + \left(\left(\tan y \cdot \tan z\right) \cdot \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z} + 1 \cdot \left(\tan y \cdot \tan z\right)\right)\right) - \tan a\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \left(\frac{\tan y + \tan z}{1 - {\left(\tan y \cdot \tan z\right)}^{3}} \cdot \left(1 + \left(\left(\tan y \cdot \tan z\right) \cdot \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z} + 1 \cdot \left(\tan y \cdot \tan z\right)\right)\right) - \tan a\right)
double f(double x, double y, double z, double a) {
        double r218153 = x;
        double r218154 = y;
        double r218155 = z;
        double r218156 = r218154 + r218155;
        double r218157 = tan(r218156);
        double r218158 = a;
        double r218159 = tan(r218158);
        double r218160 = r218157 - r218159;
        double r218161 = r218153 + r218160;
        return r218161;
}

double f(double x, double y, double z, double a) {
        double r218162 = x;
        double r218163 = y;
        double r218164 = tan(r218163);
        double r218165 = z;
        double r218166 = tan(r218165);
        double r218167 = r218164 + r218166;
        double r218168 = 1.0;
        double r218169 = r218164 * r218166;
        double r218170 = 3.0;
        double r218171 = pow(r218169, r218170);
        double r218172 = r218168 - r218171;
        double r218173 = r218167 / r218172;
        double r218174 = sin(r218163);
        double r218175 = sin(r218165);
        double r218176 = r218174 * r218175;
        double r218177 = cos(r218163);
        double r218178 = cos(r218165);
        double r218179 = r218177 * r218178;
        double r218180 = r218176 / r218179;
        double r218181 = r218169 * r218180;
        double r218182 = r218168 * r218169;
        double r218183 = r218181 + r218182;
        double r218184 = r218168 + r218183;
        double r218185 = r218173 * r218184;
        double r218186 = a;
        double r218187 = tan(r218186);
        double r218188 = r218185 - r218187;
        double r218189 = r218162 + r218188;
        return r218189;
}

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

    \[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 y + \tan z}{1 - {\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)\]
  8. Using strategy rm
  9. Applied tan-quot0.2

    \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - {\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 \color{blue}{\frac{\sin z}{\cos z}}\right) + 1 \cdot \left(\tan y \cdot \tan z\right)\right)\right) - \tan a\right)\]
  10. Applied tan-quot0.2

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

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

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

Reproduce

herbie shell --seed 2019344 
(FPCore (x y z a)
  :name "(+ x (- (tan (+ y z)) (tan a)))"
  :precision binary64
  :pre (and (or (== x 0.0) (<= 0.5884142 x 505.5909)) (or (<= -1.796658e+308 y -9.425585e-310) (<= 1.284938e-309 y 1.7512240000000001e+308)) (or (<= -1.7767070000000002e+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.7512240000000001e+308)))
  (+ x (- (tan (+ y z)) (tan a))))