Average Error: 13.2 → 0.2
Time: 30.3s
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 + \left(\frac{\frac{1}{\cos y} \cdot \frac{\sin y \cdot \cos z + \cos y \cdot \sin z}{\cos z}}{1 - \tan y \cdot \tan z} - \tan a\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \left(\frac{\frac{1}{\cos y} \cdot \frac{\sin y \cdot \cos z + \cos y \cdot \sin z}{\cos z}}{1 - \tan y \cdot \tan z} - \tan a\right)
double f(double x, double y, double z, double a) {
        double r106928 = x;
        double r106929 = y;
        double r106930 = z;
        double r106931 = r106929 + r106930;
        double r106932 = tan(r106931);
        double r106933 = a;
        double r106934 = tan(r106933);
        double r106935 = r106932 - r106934;
        double r106936 = r106928 + r106935;
        return r106936;
}

double f(double x, double y, double z, double a) {
        double r106937 = x;
        double r106938 = 1.0;
        double r106939 = y;
        double r106940 = cos(r106939);
        double r106941 = r106938 / r106940;
        double r106942 = sin(r106939);
        double r106943 = z;
        double r106944 = cos(r106943);
        double r106945 = r106942 * r106944;
        double r106946 = sin(r106943);
        double r106947 = r106940 * r106946;
        double r106948 = r106945 + r106947;
        double r106949 = r106948 / r106944;
        double r106950 = r106941 * r106949;
        double r106951 = tan(r106939);
        double r106952 = tan(r106943);
        double r106953 = r106951 * r106952;
        double r106954 = r106938 - r106953;
        double r106955 = r106950 / r106954;
        double r106956 = a;
        double r106957 = tan(r106956);
        double r106958 = r106955 - r106957;
        double r106959 = r106937 + r106958;
        return r106959;
}

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

    \[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 tan-quot0.2

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

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

    \[\leadsto x + \left(\frac{\color{blue}{\frac{\sin y \cdot \cos z + \cos y \cdot \sin z}{\cos y \cdot \cos z}}}{1 - \tan y \cdot \tan z} - \tan a\right)\]
  8. Using strategy rm
  9. Applied *-un-lft-identity0.2

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

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

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

Reproduce

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