Average Error: 13.1 → 0.2
Time: 31.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 + \left(\frac{\frac{\sin z}{\cos z} + \frac{\sin y}{\cos y}}{1 - \tan y \cdot \tan z} - \tan a\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \left(\frac{\frac{\sin z}{\cos z} + \frac{\sin y}{\cos y}}{1 - \tan y \cdot \tan z} - \tan a\right)
double f(double x, double y, double z, double a) {
        double r128882 = x;
        double r128883 = y;
        double r128884 = z;
        double r128885 = r128883 + r128884;
        double r128886 = tan(r128885);
        double r128887 = a;
        double r128888 = tan(r128887);
        double r128889 = r128886 - r128888;
        double r128890 = r128882 + r128889;
        return r128890;
}

double f(double x, double y, double z, double a) {
        double r128891 = x;
        double r128892 = z;
        double r128893 = sin(r128892);
        double r128894 = cos(r128892);
        double r128895 = r128893 / r128894;
        double r128896 = y;
        double r128897 = sin(r128896);
        double r128898 = cos(r128896);
        double r128899 = r128897 / r128898;
        double r128900 = r128895 + r128899;
        double r128901 = 1.0;
        double r128902 = tan(r128896);
        double r128903 = tan(r128892);
        double r128904 = r128902 * r128903;
        double r128905 = r128901 - r128904;
        double r128906 = r128900 / r128905;
        double r128907 = a;
        double r128908 = tan(r128907);
        double r128909 = r128906 - r128908;
        double r128910 = r128891 + r128909;
        return r128910;
}

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

    \[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. Taylor expanded around inf 0.2

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

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

Reproduce

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