Average Error: 13.1 → 0.2
Time: 36.2s
Precision: 64
\[\left(x = 0.0 \lor 0.5884141999999999983472775966220069676638 \le x \le 505.5908999999999764440872240811586380005\right) \land \left(-1.7966580000000000931214523812968299911 \cdot 10^{308} \le y \le -9.425585000000013069597555966781986720373 \cdot 10^{-310} \lor 1.284937999999999548796432976649400331091 \cdot 10^{-309} \le y \le 1.751223999999999928063201074847742204824 \cdot 10^{308}\right) \land \left(-1.776707000000000001259808757982040817204 \cdot 10^{308} \le z \le -8.599796000000016667475923823712126825539 \cdot 10^{-310} \lor 3.293144999999983071955117582595641261776 \cdot 10^{-311} \le z \le 1.725154000000000087891269878141591702413 \cdot 10^{308}\right) \land \left(-1.7966580000000000931214523812968299911 \cdot 10^{308} \le a \le -9.425585000000013069597555966781986720373 \cdot 10^{-310} \lor 1.284937999999999548796432976649400331091 \cdot 10^{-309} \le a \le 1.751223999999999928063201074847742204824 \cdot 10^{308}\right)\]
\[x + \left(\tan \left(y + z\right) - \tan a\right)\]
\[x + \left(\frac{\tan y + \tan z}{1 - \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)\]
x + \left(\tan \left(y + z\right) - \tan a\right)
x + \left(\frac{\tan y + \tan z}{1 - \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)
double f(double x, double y, double z, double a) {
        double r9216815 = x;
        double r9216816 = y;
        double r9216817 = z;
        double r9216818 = r9216816 + r9216817;
        double r9216819 = tan(r9216818);
        double r9216820 = a;
        double r9216821 = tan(r9216820);
        double r9216822 = r9216819 - r9216821;
        double r9216823 = r9216815 + r9216822;
        return r9216823;
}

double f(double x, double y, double z, double a) {
        double r9216824 = x;
        double r9216825 = y;
        double r9216826 = tan(r9216825);
        double r9216827 = z;
        double r9216828 = tan(r9216827);
        double r9216829 = r9216826 + r9216828;
        double r9216830 = 1.0;
        double r9216831 = r9216826 * r9216828;
        double r9216832 = cbrt(r9216831);
        double r9216833 = r9216832 * r9216832;
        double r9216834 = r9216833 * r9216832;
        double r9216835 = r9216830 - r9216834;
        double r9216836 = r9216829 / r9216835;
        double r9216837 = a;
        double r9216838 = tan(r9216837);
        double r9216839 = r9216836 - r9216838;
        double r9216840 = r9216824 + r9216839;
        return r9216840;
}

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

    \[\leadsto x + \left(\frac{\tan y + \tan 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)\]
  6. Final simplification0.2

    \[\leadsto x + \left(\frac{\tan y + \tan z}{1 - \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)\]

Reproduce

herbie shell --seed 2019174 +o rules:numerics
(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))))