Average Error: 13.1 → 0.3
Time: 16.5s
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 r209472 = x;
        double r209473 = y;
        double r209474 = z;
        double r209475 = r209473 + r209474;
        double r209476 = tan(r209475);
        double r209477 = a;
        double r209478 = tan(r209477);
        double r209479 = r209476 - r209478;
        double r209480 = r209472 + r209479;
        return r209480;
}

double f(double x, double y, double z, double a) {
        double r209481 = x;
        double r209482 = z;
        double r209483 = tan(r209482);
        double r209484 = y;
        double r209485 = tan(r209484);
        double r209486 = r209483 + r209485;
        double r209487 = 1.0;
        double r209488 = r209485 * r209483;
        double r209489 = r209487 - r209488;
        double r209490 = a;
        double r209491 = sin(r209490);
        double r209492 = r209489 * r209491;
        double r209493 = cos(r209490);
        double r209494 = r209492 / r209493;
        double r209495 = r209486 - r209494;
        double r209496 = r209483 * r209485;
        double r209497 = 3.0;
        double r209498 = pow(r209496, r209497);
        double r209499 = r209487 - r209498;
        double r209500 = r209495 / r209499;
        double r209501 = exp(r209496);
        double r209502 = log(r209501);
        double r209503 = pow(r209502, r209497);
        double r209504 = cbrt(r209503);
        double r209505 = r209504 * r209504;
        double r209506 = r209504 + r209505;
        double r209507 = r209487 + r209506;
        double r209508 = r209500 * r209507;
        double r209509 = r209481 + r209508;
        return r209509;
}

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))))