Average Error: 13.3 → 0.2
Time: 37.3s
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)\]
\[\left(\frac{\tan y + \tan z}{1 - \frac{\log \left(e^{\sin z \cdot \tan y}\right)}{\cos z}} - \tan a\right) + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\left(\frac{\tan y + \tan z}{1 - \frac{\log \left(e^{\sin z \cdot \tan y}\right)}{\cos z}} - \tan a\right) + x
double f(double x, double y, double z, double a) {
        double r4197077 = x;
        double r4197078 = y;
        double r4197079 = z;
        double r4197080 = r4197078 + r4197079;
        double r4197081 = tan(r4197080);
        double r4197082 = a;
        double r4197083 = tan(r4197082);
        double r4197084 = r4197081 - r4197083;
        double r4197085 = r4197077 + r4197084;
        return r4197085;
}

double f(double x, double y, double z, double a) {
        double r4197086 = y;
        double r4197087 = tan(r4197086);
        double r4197088 = z;
        double r4197089 = tan(r4197088);
        double r4197090 = r4197087 + r4197089;
        double r4197091 = 1.0;
        double r4197092 = sin(r4197088);
        double r4197093 = r4197092 * r4197087;
        double r4197094 = exp(r4197093);
        double r4197095 = log(r4197094);
        double r4197096 = cos(r4197088);
        double r4197097 = r4197095 / r4197096;
        double r4197098 = r4197091 - r4197097;
        double r4197099 = r4197090 / r4197098;
        double r4197100 = a;
        double r4197101 = tan(r4197100);
        double r4197102 = r4197099 - r4197101;
        double r4197103 = x;
        double r4197104 = r4197102 + r4197103;
        return r4197104;
}

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

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

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

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

Reproduce

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