Average Error: 13.4 → 0.2
Time: 26.1s
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{\left(\sin y \cdot \cos z\right) \cdot \left(\sin y \cdot \cos z\right) - \left(\cos y \cdot \sin z\right) \cdot \left(\cos y \cdot \sin z\right)}{\left(\cos y \cdot \cos z\right) \cdot \left(\sin y \cdot \cos z - \cos y \cdot \sin z\right)}}{1 - \frac{\sin y \cdot \tan z}{\cos y}} - \tan a\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \left(\frac{\frac{\left(\sin y \cdot \cos z\right) \cdot \left(\sin y \cdot \cos z\right) - \left(\cos y \cdot \sin z\right) \cdot \left(\cos y \cdot \sin z\right)}{\left(\cos y \cdot \cos z\right) \cdot \left(\sin y \cdot \cos z - \cos y \cdot \sin z\right)}}{1 - \frac{\sin y \cdot \tan z}{\cos y}} - \tan a\right)
double f(double x, double y, double z, double a) {
        double r114006 = x;
        double r114007 = y;
        double r114008 = z;
        double r114009 = r114007 + r114008;
        double r114010 = tan(r114009);
        double r114011 = a;
        double r114012 = tan(r114011);
        double r114013 = r114010 - r114012;
        double r114014 = r114006 + r114013;
        return r114014;
}

double f(double x, double y, double z, double a) {
        double r114015 = x;
        double r114016 = y;
        double r114017 = sin(r114016);
        double r114018 = z;
        double r114019 = cos(r114018);
        double r114020 = r114017 * r114019;
        double r114021 = r114020 * r114020;
        double r114022 = cos(r114016);
        double r114023 = sin(r114018);
        double r114024 = r114022 * r114023;
        double r114025 = r114024 * r114024;
        double r114026 = r114021 - r114025;
        double r114027 = r114022 * r114019;
        double r114028 = r114020 - r114024;
        double r114029 = r114027 * r114028;
        double r114030 = r114026 / r114029;
        double r114031 = 1.0;
        double r114032 = tan(r114018);
        double r114033 = r114017 * r114032;
        double r114034 = r114033 / r114022;
        double r114035 = r114031 - r114034;
        double r114036 = r114030 / r114035;
        double r114037 = a;
        double r114038 = tan(r114037);
        double r114039 = r114036 - r114038;
        double r114040 = r114015 + r114039;
        return r114040;
}

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

    \[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 + \tan z}{1 - \color{blue}{\frac{\sin y}{\cos y}} \cdot \tan z} - \tan a\right)\]
  6. Applied associate-*l/0.2

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

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

    \[\leadsto x + \left(\frac{\color{blue}{\frac{\sin y}{\cos y}} + \frac{\sin z}{\cos z}}{1 - \frac{\sin y \cdot \tan z}{\cos y}} - \tan a\right)\]
  10. 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 - \frac{\sin y \cdot \tan z}{\cos y}} - \tan a\right)\]
  11. Using strategy rm
  12. Applied flip-+0.2

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

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

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

Reproduce

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