Average Error: 13.1 → 0.3
Time: 17.1s
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 + \frac{\left(\tan z + \tan y\right) - \frac{\left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\cos a}}{1 - {\left(\tan z \cdot \tan y\right)}^{3}} \cdot \left(1 + \left(\sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}} + \sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}} \cdot \sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}}\right)\right)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \frac{\left(\tan z + \tan y\right) - \frac{\left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\cos a}}{1 - {\left(\tan z \cdot \tan y\right)}^{3}} \cdot \left(1 + \left(\sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}} + \sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}} \cdot \sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}}\right)\right)
double f(double x, double y, double z, double a) {
        double r210011 = x;
        double r210012 = y;
        double r210013 = z;
        double r210014 = r210012 + r210013;
        double r210015 = tan(r210014);
        double r210016 = a;
        double r210017 = tan(r210016);
        double r210018 = r210015 - r210017;
        double r210019 = r210011 + r210018;
        return r210019;
}

double f(double x, double y, double z, double a) {
        double r210020 = x;
        double r210021 = z;
        double r210022 = tan(r210021);
        double r210023 = y;
        double r210024 = tan(r210023);
        double r210025 = r210022 + r210024;
        double r210026 = 1.0;
        double r210027 = r210024 * r210022;
        double r210028 = r210026 - r210027;
        double r210029 = a;
        double r210030 = sin(r210029);
        double r210031 = r210028 * r210030;
        double r210032 = cos(r210029);
        double r210033 = r210031 / r210032;
        double r210034 = r210025 - r210033;
        double r210035 = r210022 * r210024;
        double r210036 = 3.0;
        double r210037 = pow(r210035, r210036);
        double r210038 = r210026 - r210037;
        double r210039 = r210034 / r210038;
        double r210040 = exp(r210035);
        double r210041 = log(r210040);
        double r210042 = pow(r210041, r210036);
        double r210043 = cbrt(r210042);
        double r210044 = r210043 * r210043;
        double r210045 = r210043 + r210044;
        double r210046 = r210026 + r210045;
        double r210047 = r210039 * r210046;
        double r210048 = r210020 + r210047;
        return r210048;
}

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-quot13.1

    \[\leadsto x + \left(\tan \left(y + z\right) - \color{blue}{\frac{\sin a}{\cos a}}\right)\]
  4. Applied tan-sum0.2

    \[\leadsto x + \left(\color{blue}{\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z}} - \frac{\sin a}{\cos a}\right)\]
  5. Applied frac-sub0.2

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

    \[\leadsto x + \frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\left(1 - \tan y \cdot \color{blue}{\sqrt[3]{\left(\tan z \cdot \tan z\right) \cdot \tan z}}\right) \cdot \cos a}\]
  8. Applied add-cbrt-cube0.2

    \[\leadsto x + \frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\left(1 - \color{blue}{\sqrt[3]{\left(\tan y \cdot \tan y\right) \cdot \tan y}} \cdot \sqrt[3]{\left(\tan z \cdot \tan z\right) \cdot \tan z}\right) \cdot \cos a}\]
  9. Applied cbrt-unprod0.2

    \[\leadsto x + \frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\left(1 - \color{blue}{\sqrt[3]{\left(\left(\tan y \cdot \tan y\right) \cdot \tan y\right) \cdot \left(\left(\tan z \cdot \tan z\right) \cdot \tan z\right)}}\right) \cdot \cos a}\]
  10. Simplified0.2

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

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

    \[\leadsto x + \frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\left(1 - \sqrt[3]{{\left(\log \color{blue}{\left(e^{\tan z \cdot \tan y}\right)}\right)}^{3}}\right) \cdot \cos a}\]
  14. Using strategy rm
  15. Applied flip3--0.3

    \[\leadsto x + \frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\color{blue}{\frac{{1}^{3} - {\left(\sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}}\right)}^{3}}{1 \cdot 1 + \left(\sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}} \cdot \sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}} + 1 \cdot \sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}}\right)}} \cdot \cos a}\]
  16. Applied associate-*l/0.3

    \[\leadsto x + \frac{\left(\tan y + \tan z\right) \cdot \cos a - \left(1 - \tan y \cdot \tan z\right) \cdot \sin a}{\color{blue}{\frac{\left({1}^{3} - {\left(\sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}}\right)}^{3}\right) \cdot \cos a}{1 \cdot 1 + \left(\sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}} \cdot \sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}} + 1 \cdot \sqrt[3]{{\left(\log \left(e^{\tan z \cdot \tan y}\right)\right)}^{3}}\right)}}}\]
  17. Applied associate-/r/0.3

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

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

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

Reproduce

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