Average Error: 13.7 → 0.2
Time: 17.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(\left(\frac{\sin y}{\left(1 - \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y}\right) \cdot \cos y} + \frac{\sin z}{\left(1 - \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y}\right) \cdot \cos z}\right) - \frac{\sin a}{\cos a}\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \left(\left(\frac{\sin y}{\left(1 - \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y}\right) \cdot \cos y} + \frac{\sin z}{\left(1 - \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y}\right) \cdot \cos z}\right) - \frac{\sin a}{\cos a}\right)
double f(double x, double y, double z, double a) {
        double r115124 = x;
        double r115125 = y;
        double r115126 = z;
        double r115127 = r115125 + r115126;
        double r115128 = tan(r115127);
        double r115129 = a;
        double r115130 = tan(r115129);
        double r115131 = r115128 - r115130;
        double r115132 = r115124 + r115131;
        return r115132;
}

double f(double x, double y, double z, double a) {
        double r115133 = x;
        double r115134 = y;
        double r115135 = sin(r115134);
        double r115136 = 1.0;
        double r115137 = z;
        double r115138 = sin(r115137);
        double r115139 = r115135 * r115138;
        double r115140 = cos(r115137);
        double r115141 = cos(r115134);
        double r115142 = r115140 * r115141;
        double r115143 = r115139 / r115142;
        double r115144 = r115136 - r115143;
        double r115145 = r115144 * r115141;
        double r115146 = r115135 / r115145;
        double r115147 = r115144 * r115140;
        double r115148 = r115138 / r115147;
        double r115149 = r115146 + r115148;
        double r115150 = a;
        double r115151 = sin(r115150);
        double r115152 = cos(r115150);
        double r115153 = r115151 / r115152;
        double r115154 = r115149 - r115153;
        double r115155 = r115133 + r115154;
        return r115155;
}

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

    \[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 + \color{blue}{\left(\left(\frac{\sin y}{\left(1 - \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y}\right) \cdot \cos y} + \frac{\sin z}{\left(1 - \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y}\right) \cdot \cos z}\right) - \frac{\sin a}{\cos a}\right)}\]
  5. Final simplification0.2

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

Reproduce

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