Average Error: 13.5 → 0.2
Time: 49.6s
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(\cos a \cdot \left(\tan y \cdot \tan y - \tan z \cdot \tan z\right)\right) \cdot \left(1 + \left(\left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right) + \tan y \cdot \tan z\right)\right) - \left(\tan y - \tan z\right) \cdot \left(\sin a \cdot \left(1 - {\left(\tan y \cdot \tan z\right)}^{3}\right)\right)}{\left(\left(1 + \left(\left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right) + \tan y \cdot \tan z\right)\right) \cdot \left(\tan y - \tan z\right)\right) \cdot \left(\left(1 - \tan y \cdot \tan z\right) \cdot \cos a\right)}\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \frac{\left(\cos a \cdot \left(\tan y \cdot \tan y - \tan z \cdot \tan z\right)\right) \cdot \left(1 + \left(\left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right) + \tan y \cdot \tan z\right)\right) - \left(\tan y - \tan z\right) \cdot \left(\sin a \cdot \left(1 - {\left(\tan y \cdot \tan z\right)}^{3}\right)\right)}{\left(\left(1 + \left(\left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right) + \tan y \cdot \tan z\right)\right) \cdot \left(\tan y - \tan z\right)\right) \cdot \left(\left(1 - \tan y \cdot \tan z\right) \cdot \cos a\right)}
double f(double x, double y, double z, double a) {
        double r7005770 = x;
        double r7005771 = y;
        double r7005772 = z;
        double r7005773 = r7005771 + r7005772;
        double r7005774 = tan(r7005773);
        double r7005775 = a;
        double r7005776 = tan(r7005775);
        double r7005777 = r7005774 - r7005776;
        double r7005778 = r7005770 + r7005777;
        return r7005778;
}

double f(double x, double y, double z, double a) {
        double r7005779 = x;
        double r7005780 = a;
        double r7005781 = cos(r7005780);
        double r7005782 = y;
        double r7005783 = tan(r7005782);
        double r7005784 = r7005783 * r7005783;
        double r7005785 = z;
        double r7005786 = tan(r7005785);
        double r7005787 = r7005786 * r7005786;
        double r7005788 = r7005784 - r7005787;
        double r7005789 = r7005781 * r7005788;
        double r7005790 = 1.0;
        double r7005791 = r7005783 * r7005786;
        double r7005792 = r7005791 * r7005791;
        double r7005793 = r7005792 + r7005791;
        double r7005794 = r7005790 + r7005793;
        double r7005795 = r7005789 * r7005794;
        double r7005796 = r7005783 - r7005786;
        double r7005797 = sin(r7005780);
        double r7005798 = 3.0;
        double r7005799 = pow(r7005791, r7005798);
        double r7005800 = r7005790 - r7005799;
        double r7005801 = r7005797 * r7005800;
        double r7005802 = r7005796 * r7005801;
        double r7005803 = r7005795 - r7005802;
        double r7005804 = r7005794 * r7005796;
        double r7005805 = r7005790 - r7005791;
        double r7005806 = r7005805 * r7005781;
        double r7005807 = r7005804 * r7005806;
        double r7005808 = r7005803 / r7005807;
        double r7005809 = r7005779 + r7005808;
        return r7005809;
}

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

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

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

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

    \[\leadsto x + \frac{\color{blue}{\frac{\tan y \cdot \tan y - \tan z \cdot \tan z}{\tan y - \tan z}} \cdot \cos a - \frac{\left({1}^{3} - {\left(\tan y \cdot \tan z\right)}^{3}\right) \cdot \sin a}{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)}}{\left(1 - \tan y \cdot \tan z\right) \cdot \cos a}\]
  10. Applied associate-*l/0.2

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

    \[\leadsto x + \frac{\color{blue}{\frac{\left(\left(\tan y \cdot \tan y - \tan z \cdot \tan z\right) \cdot \cos a\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) - \left(\tan y - \tan z\right) \cdot \left(\left({1}^{3} - {\left(\tan y \cdot \tan z\right)}^{3}\right) \cdot \sin a\right)}{\left(\tan y - \tan 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)}}}{\left(1 - \tan y \cdot \tan z\right) \cdot \cos a}\]
  12. Applied associate-/l/0.2

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

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

Reproduce

herbie shell --seed 2019170 
(FPCore (x y z a)
  :name "(+ x (- (tan (+ y z)) (tan a)))"
  :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))))