Average Error: 13.2 → 0.2
Time: 49.0s
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{\tan y \cdot \tan y - \tan z \cdot \tan z}{\tan y - \tan z}}{1 - \tan y \cdot \tan z} - \tan a\right) + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\left(\frac{\frac{\tan y \cdot \tan y - \tan z \cdot \tan z}{\tan y - \tan z}}{1 - \tan y \cdot \tan z} - \tan a\right) + x
double f(double x, double y, double z, double a) {
        double r17700998 = x;
        double r17700999 = y;
        double r17701000 = z;
        double r17701001 = r17700999 + r17701000;
        double r17701002 = tan(r17701001);
        double r17701003 = a;
        double r17701004 = tan(r17701003);
        double r17701005 = r17701002 - r17701004;
        double r17701006 = r17700998 + r17701005;
        return r17701006;
}

double f(double x, double y, double z, double a) {
        double r17701007 = y;
        double r17701008 = tan(r17701007);
        double r17701009 = r17701008 * r17701008;
        double r17701010 = z;
        double r17701011 = tan(r17701010);
        double r17701012 = r17701011 * r17701011;
        double r17701013 = r17701009 - r17701012;
        double r17701014 = r17701008 - r17701011;
        double r17701015 = r17701013 / r17701014;
        double r17701016 = 1.0;
        double r17701017 = r17701008 * r17701011;
        double r17701018 = r17701016 - r17701017;
        double r17701019 = r17701015 / r17701018;
        double r17701020 = a;
        double r17701021 = tan(r17701020);
        double r17701022 = r17701019 - r17701021;
        double r17701023 = x;
        double r17701024 = r17701022 + r17701023;
        return r17701024;
}

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 flip-+0.2

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

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

Reproduce

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