Average Error: 13.6 → 0.3
Time: 36.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)\]
\[\log \left(e^{\left(x + \frac{\tan y + \tan z}{1 - \tan z \cdot \tan y}\right) - \tan a}\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\log \left(e^{\left(x + \frac{\tan y + \tan z}{1 - \tan z \cdot \tan y}\right) - \tan a}\right)
double f(double x, double y, double z, double a) {
        double r4645262 = x;
        double r4645263 = y;
        double r4645264 = z;
        double r4645265 = r4645263 + r4645264;
        double r4645266 = tan(r4645265);
        double r4645267 = a;
        double r4645268 = tan(r4645267);
        double r4645269 = r4645266 - r4645268;
        double r4645270 = r4645262 + r4645269;
        return r4645270;
}

double f(double x, double y, double z, double a) {
        double r4645271 = x;
        double r4645272 = y;
        double r4645273 = tan(r4645272);
        double r4645274 = z;
        double r4645275 = tan(r4645274);
        double r4645276 = r4645273 + r4645275;
        double r4645277 = 1.0;
        double r4645278 = r4645275 * r4645273;
        double r4645279 = r4645277 - r4645278;
        double r4645280 = r4645276 / r4645279;
        double r4645281 = r4645271 + r4645280;
        double r4645282 = a;
        double r4645283 = tan(r4645282);
        double r4645284 = r4645281 - r4645283;
        double r4645285 = exp(r4645284);
        double r4645286 = log(r4645285);
        return r4645286;
}

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

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

    \[\leadsto \color{blue}{\log \left(e^{x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z} - \tan a\right)}\right)}\]
  6. Using strategy rm
  7. Applied associate-+r-0.3

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

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

Reproduce

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