Average Error: 12.9 → 0.2
Time: 12.0s
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)\]
\[\log \left(e^{x} \cdot \frac{e^{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}}}{e^{\tan a}}\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\log \left(e^{x} \cdot \frac{e^{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}}}{e^{\tan a}}\right)
double f(double x, double y, double z, double a) {
        double r218725 = x;
        double r218726 = y;
        double r218727 = z;
        double r218728 = r218726 + r218727;
        double r218729 = tan(r218728);
        double r218730 = a;
        double r218731 = tan(r218730);
        double r218732 = r218729 - r218731;
        double r218733 = r218725 + r218732;
        return r218733;
}

double f(double x, double y, double z, double a) {
        double r218734 = x;
        double r218735 = exp(r218734);
        double r218736 = y;
        double r218737 = tan(r218736);
        double r218738 = z;
        double r218739 = tan(r218738);
        double r218740 = r218737 + r218739;
        double r218741 = 1.0;
        double r218742 = r218737 * r218739;
        double r218743 = r218741 - r218742;
        double r218744 = r218740 / r218743;
        double r218745 = exp(r218744);
        double r218746 = a;
        double r218747 = tan(r218746);
        double r218748 = exp(r218747);
        double r218749 = r218745 / r218748;
        double r218750 = r218735 * r218749;
        double r218751 = log(r218750);
        return r218751;
}

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 12.9

    \[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 x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z} - \color{blue}{\log \left(e^{\tan a}\right)}\right)\]
  6. Applied add-log-exp0.2

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

    \[\leadsto x + \color{blue}{\log \left(\frac{e^{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}}}{e^{\tan a}}\right)}\]
  8. Applied add-log-exp0.2

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

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

    \[\leadsto \log \color{blue}{\left(e^{x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z} - \tan a\right)}\right)}\]
  11. Using strategy rm
  12. Applied add-log-exp0.2

    \[\leadsto \log \left(e^{x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z} - \color{blue}{\log \left(e^{\tan a}\right)}\right)}\right)\]
  13. Applied add-log-exp0.2

    \[\leadsto \log \left(e^{x + \left(\color{blue}{\log \left(e^{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}}\right)} - \log \left(e^{\tan a}\right)\right)}\right)\]
  14. Applied diff-log0.2

    \[\leadsto \log \left(e^{x + \color{blue}{\log \left(\frac{e^{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}}}{e^{\tan a}}\right)}}\right)\]
  15. Applied add-log-exp0.2

    \[\leadsto \log \left(e^{\color{blue}{\log \left(e^{x}\right)} + \log \left(\frac{e^{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}}}{e^{\tan a}}\right)}\right)\]
  16. Applied sum-log0.2

    \[\leadsto \log \left(e^{\color{blue}{\log \left(e^{x} \cdot \frac{e^{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}}}{e^{\tan a}}\right)}}\right)\]
  17. Applied rem-exp-log0.2

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

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

Reproduce

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