Average Error: 13.1 → 0.2
Time: 33.4s
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(\tan a - \frac{\tan z + \tan y}{1 - \frac{\frac{\sin z \cdot \sin y}{\cos y}}{\cos z}}\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x - \left(\tan a - \frac{\tan z + \tan y}{1 - \frac{\frac{\sin z \cdot \sin y}{\cos y}}{\cos z}}\right)
double f(double x, double y, double z, double a) {
        double r117032 = x;
        double r117033 = y;
        double r117034 = z;
        double r117035 = r117033 + r117034;
        double r117036 = tan(r117035);
        double r117037 = a;
        double r117038 = tan(r117037);
        double r117039 = r117036 - r117038;
        double r117040 = r117032 + r117039;
        return r117040;
}

double f(double x, double y, double z, double a) {
        double r117041 = x;
        double r117042 = a;
        double r117043 = tan(r117042);
        double r117044 = z;
        double r117045 = tan(r117044);
        double r117046 = y;
        double r117047 = tan(r117046);
        double r117048 = r117045 + r117047;
        double r117049 = 1.0;
        double r117050 = sin(r117044);
        double r117051 = sin(r117046);
        double r117052 = r117050 * r117051;
        double r117053 = cos(r117046);
        double r117054 = r117052 / r117053;
        double r117055 = cos(r117044);
        double r117056 = r117054 / r117055;
        double r117057 = r117049 - r117056;
        double r117058 = r117048 / r117057;
        double r117059 = r117043 - r117058;
        double r117060 = r117041 - r117059;
        return r117060;
}

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

    \[\leadsto \color{blue}{x - \left(\tan a - \tan \left(y + z\right)\right)}\]
  3. Using strategy rm
  4. Applied tan-sum0.2

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

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

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

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

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

Reproduce

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