Average Error: 12.9 → 0.2
Time: 26.2s
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{\tan z + \tan y}{1 - \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y} \cdot \left(\tan z \cdot \tan y\right)} \cdot \left(1 + \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y}\right) - \tan a\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \left(\frac{\tan z + \tan y}{1 - \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y} \cdot \left(\tan z \cdot \tan y\right)} \cdot \left(1 + \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y}\right) - \tan a\right)
double f(double x, double y, double z, double a) {
        double r133984 = x;
        double r133985 = y;
        double r133986 = z;
        double r133987 = r133985 + r133986;
        double r133988 = tan(r133987);
        double r133989 = a;
        double r133990 = tan(r133989);
        double r133991 = r133988 - r133990;
        double r133992 = r133984 + r133991;
        return r133992;
}

double f(double x, double y, double z, double a) {
        double r133993 = x;
        double r133994 = z;
        double r133995 = tan(r133994);
        double r133996 = y;
        double r133997 = tan(r133996);
        double r133998 = r133995 + r133997;
        double r133999 = 1.0;
        double r134000 = sin(r133996);
        double r134001 = sin(r133994);
        double r134002 = r134000 * r134001;
        double r134003 = cos(r133994);
        double r134004 = cos(r133996);
        double r134005 = r134003 * r134004;
        double r134006 = r134002 / r134005;
        double r134007 = r133995 * r133997;
        double r134008 = r134006 * r134007;
        double r134009 = r133999 - r134008;
        double r134010 = r133998 / r134009;
        double r134011 = r133999 + r134006;
        double r134012 = r134010 * r134011;
        double r134013 = a;
        double r134014 = tan(r134013);
        double r134015 = r134012 - r134014;
        double r134016 = r133993 + r134015;
        return r134016;
}

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

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

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

    \[\leadsto x + \left(\frac{\tan z + \tan y}{\color{blue}{1 - \tan z \cdot \tan y}} - \tan a\right)\]
  6. Using strategy rm
  7. Applied flip--0.2

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

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

    \[\leadsto x + \left(\color{blue}{\frac{\tan z + \tan y}{1 - \left(\tan z \cdot \tan y\right) \cdot \left(\tan z \cdot \tan y\right)}} \cdot \left(1 + \tan z \cdot \tan y\right) - \tan a\right)\]
  10. Using strategy rm
  11. Applied tan-quot0.2

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

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

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

    \[\leadsto x + \left(\frac{\tan z + \tan y}{1 - \frac{\color{blue}{\sin y \cdot \sin z}}{\cos z \cdot \cos y} \cdot \left(\tan z \cdot \tan y\right)} \cdot \left(1 + \tan z \cdot \tan y\right) - \tan a\right)\]
  15. Taylor expanded around inf 0.2

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

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

Reproduce

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