Average Error: 12.8 → 0.2
Time: 23.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)\]
\[\left(x - \tan a\right) - \frac{-\left(\tan y + \tan z\right)}{1 - \tan y \cdot \tan z}\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\left(x - \tan a\right) - \frac{-\left(\tan y + \tan z\right)}{1 - \tan y \cdot \tan z}
double f(double x, double y, double z, double a) {
        double r176866 = x;
        double r176867 = y;
        double r176868 = z;
        double r176869 = r176867 + r176868;
        double r176870 = tan(r176869);
        double r176871 = a;
        double r176872 = tan(r176871);
        double r176873 = r176870 - r176872;
        double r176874 = r176866 + r176873;
        return r176874;
}

double f(double x, double y, double z, double a) {
        double r176875 = x;
        double r176876 = a;
        double r176877 = tan(r176876);
        double r176878 = r176875 - r176877;
        double r176879 = y;
        double r176880 = tan(r176879);
        double r176881 = z;
        double r176882 = tan(r176881);
        double r176883 = r176880 + r176882;
        double r176884 = -r176883;
        double r176885 = 1.0;
        double r176886 = r176880 * r176882;
        double r176887 = r176885 - r176886;
        double r176888 = r176884 / r176887;
        double r176889 = r176878 - r176888;
        return r176889;
}

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 12.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 add-cube-cbrt0.2

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

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

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

Reproduce

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