Average Error: 13.2 → 0.3
Time: 26.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.75122399999999993 \cdot 10^{308}\right) \land \left(-1.776707 \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.75122399999999993 \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}}}{\sqrt{e^{\tan a}} \cdot \sqrt{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}}}{\sqrt{e^{\tan a}} \cdot \sqrt{e^{\tan a}}}\right)
double f(double x, double y, double z, double a) {
        double r133756 = x;
        double r133757 = y;
        double r133758 = z;
        double r133759 = r133757 + r133758;
        double r133760 = tan(r133759);
        double r133761 = a;
        double r133762 = tan(r133761);
        double r133763 = r133760 - r133762;
        double r133764 = r133756 + r133763;
        return r133764;
}

double f(double x, double y, double z, double a) {
        double r133765 = x;
        double r133766 = exp(r133765);
        double r133767 = y;
        double r133768 = tan(r133767);
        double r133769 = z;
        double r133770 = tan(r133769);
        double r133771 = r133768 + r133770;
        double r133772 = 1.0;
        double r133773 = r133768 * r133770;
        double r133774 = r133772 - r133773;
        double r133775 = r133771 / r133774;
        double r133776 = exp(r133775);
        double r133777 = a;
        double r133778 = tan(r133777);
        double r133779 = exp(r133778);
        double r133780 = sqrt(r133779);
        double r133781 = r133780 * r133780;
        double r133782 = r133776 / r133781;
        double r133783 = r133766 * r133782;
        double r133784 = log(r133783);
        return r133784;
}

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

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

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

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

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

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

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

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

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

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

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

    \[\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. Using strategy rm
  19. Applied add-sqr-sqrt0.3

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

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

Reproduce

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