Average Error: 13.2 → 0.2
Time: 30.8s
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 y + \tan z}{1 - \frac{\log \left(e^{\sin y \cdot \tan z}\right)}{\cos y}} - \tan a\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \left(\frac{\tan y + \tan z}{1 - \frac{\log \left(e^{\sin y \cdot \tan z}\right)}{\cos y}} - \tan a\right)
double f(double x, double y, double z, double a) {
        double r93900 = x;
        double r93901 = y;
        double r93902 = z;
        double r93903 = r93901 + r93902;
        double r93904 = tan(r93903);
        double r93905 = a;
        double r93906 = tan(r93905);
        double r93907 = r93904 - r93906;
        double r93908 = r93900 + r93907;
        return r93908;
}

double f(double x, double y, double z, double a) {
        double r93909 = x;
        double r93910 = y;
        double r93911 = tan(r93910);
        double r93912 = z;
        double r93913 = tan(r93912);
        double r93914 = r93911 + r93913;
        double r93915 = 1.0;
        double r93916 = sin(r93910);
        double r93917 = r93916 * r93913;
        double r93918 = exp(r93917);
        double r93919 = log(r93918);
        double r93920 = cos(r93910);
        double r93921 = r93919 / r93920;
        double r93922 = r93915 - r93921;
        double r93923 = r93914 / r93922;
        double r93924 = a;
        double r93925 = tan(r93924);
        double r93926 = r93923 - r93925;
        double r93927 = r93909 + r93926;
        return r93927;
}

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

    \[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 add-log-exp0.2

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

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

Reproduce

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