Average Error: 13.1 → 0.2
Time: 37.6s
Precision: 64
\[\left(x = 0 \lor 0.5884142 \le x \le 505.5909\right) \land \left(-1.796658 \cdot 10^{+308} \le y \le -9.425585 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \le y \le 1.751224 \cdot 10^{+308}\right) \land \left(-1.776707 \cdot 10^{+308} \le z \le -8.599796 \cdot 10^{-310} \lor 3.293145 \cdot 10^{-311} \le z \le 1.725154 \cdot 10^{+308}\right) \land \left(-1.796658 \cdot 10^{+308} \le a \le -9.425585 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \le a \le 1.751224 \cdot 10^{+308}\right)\]
\[x + \left(\tan \left(y + z\right) - \tan a\right)\]
\[\frac{\cos a \cdot \left(\tan z + \tan y\right) - \sin a \cdot \left(1 - \tan y \cdot \tan z\right)}{\cos a \cdot \left(1 - \left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right)\right)} \cdot \left(\tan y \cdot \tan z + 1\right) + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\frac{\cos a \cdot \left(\tan z + \tan y\right) - \sin a \cdot \left(1 - \tan y \cdot \tan z\right)}{\cos a \cdot \left(1 - \left(\tan y \cdot \tan z\right) \cdot \left(\tan y \cdot \tan z\right)\right)} \cdot \left(\tan y \cdot \tan z + 1\right) + x
double f(double x, double y, double z, double a) {
        double r2224925 = x;
        double r2224926 = y;
        double r2224927 = z;
        double r2224928 = r2224926 + r2224927;
        double r2224929 = tan(r2224928);
        double r2224930 = a;
        double r2224931 = tan(r2224930);
        double r2224932 = r2224929 - r2224931;
        double r2224933 = r2224925 + r2224932;
        return r2224933;
}

double f(double x, double y, double z, double a) {
        double r2224934 = a;
        double r2224935 = cos(r2224934);
        double r2224936 = z;
        double r2224937 = tan(r2224936);
        double r2224938 = y;
        double r2224939 = tan(r2224938);
        double r2224940 = r2224937 + r2224939;
        double r2224941 = r2224935 * r2224940;
        double r2224942 = sin(r2224934);
        double r2224943 = 1.0;
        double r2224944 = r2224939 * r2224937;
        double r2224945 = r2224943 - r2224944;
        double r2224946 = r2224942 * r2224945;
        double r2224947 = r2224941 - r2224946;
        double r2224948 = r2224944 * r2224944;
        double r2224949 = r2224943 - r2224948;
        double r2224950 = r2224935 * r2224949;
        double r2224951 = r2224947 / r2224950;
        double r2224952 = r2224944 + r2224943;
        double r2224953 = r2224951 * r2224952;
        double r2224954 = x;
        double r2224955 = r2224953 + r2224954;
        return r2224955;
}

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. Using strategy rm
  3. Applied tan-quot13.1

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

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

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

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

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

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

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

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

Reproduce

herbie shell --seed 2019153 
(FPCore (x y z a)
  :name "(+ x (- (tan (+ y z)) (tan a)))"
  :pre (and (or (== x 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))))