Average Error: 13.1 → 0.2
Time: 9.2s
Precision: 64
\[\left(x = 0.0 \lor 0.588414199999999998 \le x \le 505.590899999999976\right) \land \left(-1.79665800000000009 \cdot 10^{308} \le y \le -9.425585000000013 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \le y \le 1.7512240000000001 \cdot 10^{308}\right) \land \left(-1.7767070000000002 \cdot 10^{308} \le z \le -8.59979600000002 \cdot 10^{-310} \lor 3.29314499999998 \cdot 10^{-311} \le z \le 1.72515400000000009 \cdot 10^{308}\right) \land \left(-1.79665800000000009 \cdot 10^{308} \le a \le -9.425585000000013 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \le a \le 1.7512240000000001 \cdot 10^{308}\right)\]
\[x + \left(\tan \left(y + z\right) - \tan a\right)\]
\[x + \left(\log \left(e^{\frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y}}}\right) - \tan a\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \left(\log \left(e^{\frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos z \cdot \cos y}}}\right) - \tan a\right)
double f(double x, double y, double z, double a) {
        double r188619 = x;
        double r188620 = y;
        double r188621 = z;
        double r188622 = r188620 + r188621;
        double r188623 = tan(r188622);
        double r188624 = a;
        double r188625 = tan(r188624);
        double r188626 = r188623 - r188625;
        double r188627 = r188619 + r188626;
        return r188627;
}

double f(double x, double y, double z, double a) {
        double r188628 = x;
        double r188629 = y;
        double r188630 = tan(r188629);
        double r188631 = z;
        double r188632 = tan(r188631);
        double r188633 = r188630 + r188632;
        double r188634 = 1.0;
        double r188635 = sin(r188629);
        double r188636 = sin(r188631);
        double r188637 = r188635 * r188636;
        double r188638 = cos(r188631);
        double r188639 = cos(r188629);
        double r188640 = r188638 * r188639;
        double r188641 = r188637 / r188640;
        double r188642 = r188634 - r188641;
        double r188643 = r188633 / r188642;
        double r188644 = exp(r188643);
        double r188645 = log(r188644);
        double r188646 = a;
        double r188647 = tan(r188646);
        double r188648 = r188645 - r188647;
        double r188649 = r188628 + r188648;
        return r188649;
}

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

    \[\leadsto x + \left(\color{blue}{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}} - \tan a\right)\]
  4. Taylor expanded around inf 0.2

    \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \color{blue}{\frac{\sin y \cdot \sin z}{\cos z \cdot \cos y}}} - \tan a\right)\]
  5. Using strategy rm
  6. Applied add-log-exp0.2

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

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

Reproduce

herbie shell --seed 2020059 
(FPCore (x y z a)
  :name "(+ x (- (tan (+ y z)) (tan a)))"
  :precision binary64
  :pre (and (or (== x 0.0) (<= 0.5884142 x 505.5909)) (or (<= -1.796658e+308 y -9.425585e-310) (<= 1.284938e-309 y 1.7512240000000001e+308)) (or (<= -1.7767070000000002e+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.7512240000000001e+308)))
  (+ x (- (tan (+ y z)) (tan a))))