Average Error: 13.4 → 0.3
Time: 41.1s
Precision: 64
\[\left(x = 0 \lor 0.5884142 \le x \le 505.5909\right) \land \left(-1.796658 \cdot 10^{+308} \le y \le -9.425585 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \le y \le 1.751224 \cdot 10^{+308}\right) \land \left(-1.776707 \cdot 10^{+308} \le z \le -8.599796 \cdot 10^{-310} \lor 3.293145 \cdot 10^{-311} \le z \le 1.725154 \cdot 10^{+308}\right) \land \left(-1.796658 \cdot 10^{+308} \le a \le -9.425585 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \le a \le 1.751224 \cdot 10^{+308}\right)\]
\[x + \left(\tan \left(y + z\right) - \tan a\right)\]
\[\left(\frac{\frac{\cos z \cdot \sin y + \sin z \cdot \cos y}{\cos y \cdot \cos z}}{1 - \sqrt[3]{\tan z \cdot \tan y} \cdot \left(\sqrt[3]{\tan z \cdot \tan y} \cdot \sqrt[3]{\tan z \cdot \tan y}\right)} - \tan a\right) + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\left(\frac{\frac{\cos z \cdot \sin y + \sin z \cdot \cos y}{\cos y \cdot \cos z}}{1 - \sqrt[3]{\tan z \cdot \tan y} \cdot \left(\sqrt[3]{\tan z \cdot \tan y} \cdot \sqrt[3]{\tan z \cdot \tan y}\right)} - \tan a\right) + x
double f(double x, double y, double z, double a) {
        double r7518954 = x;
        double r7518955 = y;
        double r7518956 = z;
        double r7518957 = r7518955 + r7518956;
        double r7518958 = tan(r7518957);
        double r7518959 = a;
        double r7518960 = tan(r7518959);
        double r7518961 = r7518958 - r7518960;
        double r7518962 = r7518954 + r7518961;
        return r7518962;
}

double f(double x, double y, double z, double a) {
        double r7518963 = z;
        double r7518964 = cos(r7518963);
        double r7518965 = y;
        double r7518966 = sin(r7518965);
        double r7518967 = r7518964 * r7518966;
        double r7518968 = sin(r7518963);
        double r7518969 = cos(r7518965);
        double r7518970 = r7518968 * r7518969;
        double r7518971 = r7518967 + r7518970;
        double r7518972 = r7518969 * r7518964;
        double r7518973 = r7518971 / r7518972;
        double r7518974 = 1.0;
        double r7518975 = tan(r7518963);
        double r7518976 = tan(r7518965);
        double r7518977 = r7518975 * r7518976;
        double r7518978 = cbrt(r7518977);
        double r7518979 = r7518978 * r7518978;
        double r7518980 = r7518978 * r7518979;
        double r7518981 = r7518974 - r7518980;
        double r7518982 = r7518973 / r7518981;
        double r7518983 = a;
        double r7518984 = tan(r7518983);
        double r7518985 = r7518982 - r7518984;
        double r7518986 = x;
        double r7518987 = r7518985 + r7518986;
        return r7518987;
}

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

    \[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 tan-quot0.2

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

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

    \[\leadsto x + \left(\frac{\color{blue}{\frac{\sin y \cdot \cos z + \cos y \cdot \sin z}{\cos y \cdot \cos z}}}{1 - \tan y \cdot \tan z} - \tan a\right)\]
  8. Using strategy rm
  9. Applied add-cube-cbrt0.3

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

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

Reproduce

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