Average Error: 13.3 → 0.2
Time: 29.0s
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)\]
\[x + \frac{\left(\tan y + \tan z\right) - \frac{\left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\cos a}}{1 - \tan y \cdot \left(\left(\tan y \cdot \tan z\right) \cdot \tan z\right)} \cdot \left(1 + \tan y \cdot \tan z\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \frac{\left(\tan y + \tan z\right) - \frac{\left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\cos a}}{1 - \tan y \cdot \left(\left(\tan y \cdot \tan z\right) \cdot \tan z\right)} \cdot \left(1 + \tan y \cdot \tan z\right)
double f(double x, double y, double z, double a) {
        double r92343 = x;
        double r92344 = y;
        double r92345 = z;
        double r92346 = r92344 + r92345;
        double r92347 = tan(r92346);
        double r92348 = a;
        double r92349 = tan(r92348);
        double r92350 = r92347 - r92349;
        double r92351 = r92343 + r92350;
        return r92351;
}

double f(double x, double y, double z, double a) {
        double r92352 = x;
        double r92353 = y;
        double r92354 = tan(r92353);
        double r92355 = z;
        double r92356 = tan(r92355);
        double r92357 = r92354 + r92356;
        double r92358 = 1.0;
        double r92359 = r92354 * r92356;
        double r92360 = r92358 - r92359;
        double r92361 = a;
        double r92362 = sin(r92361);
        double r92363 = r92360 * r92362;
        double r92364 = cos(r92361);
        double r92365 = r92363 / r92364;
        double r92366 = r92357 - r92365;
        double r92367 = r92359 * r92356;
        double r92368 = r92354 * r92367;
        double r92369 = r92358 - r92368;
        double r92370 = r92366 / r92369;
        double r92371 = r92358 + r92359;
        double r92372 = r92370 * r92371;
        double r92373 = r92352 + r92372;
        return r92373;
}

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-quot13.3

    \[\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 flip--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 \cdot 1 - \left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right)}{1 + \tan y \cdot \tan z}} \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}{\color{blue}{\frac{\left(1 \cdot 1 - \left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right)\right) \cdot \cos a}{1 + \tan y \cdot \tan z}}}\]
  9. 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 \cdot 1 - \left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right)\right) \cdot \cos a} \cdot \left(1 + \tan y \cdot \tan z\right)}\]
  10. Simplified0.2

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

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

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

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

Reproduce

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