Average Error: 13.3 → 0.2
Time: 28.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)\]
\[\frac{\frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}} \cdot \frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}} - \tan a \cdot \tan a}{\tan a + \frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}}} + x\]
x + \left(\tan \left(y + z\right) - \tan a\right)
\frac{\frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}} \cdot \frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}} - \tan a \cdot \tan a}{\tan a + \frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}}} + x
double f(double x, double y, double z, double a) {
        double r2166818 = x;
        double r2166819 = y;
        double r2166820 = z;
        double r2166821 = r2166819 + r2166820;
        double r2166822 = tan(r2166821);
        double r2166823 = a;
        double r2166824 = tan(r2166823);
        double r2166825 = r2166822 - r2166824;
        double r2166826 = r2166818 + r2166825;
        return r2166826;
}

double f(double x, double y, double z, double a) {
        double r2166827 = y;
        double r2166828 = tan(r2166827);
        double r2166829 = z;
        double r2166830 = tan(r2166829);
        double r2166831 = r2166828 + r2166830;
        double r2166832 = 1.0;
        double r2166833 = sin(r2166827);
        double r2166834 = sin(r2166829);
        double r2166835 = r2166833 * r2166834;
        double r2166836 = cos(r2166827);
        double r2166837 = cos(r2166829);
        double r2166838 = r2166836 * r2166837;
        double r2166839 = r2166835 / r2166838;
        double r2166840 = r2166832 - r2166839;
        double r2166841 = r2166831 / r2166840;
        double r2166842 = r2166841 * r2166841;
        double r2166843 = a;
        double r2166844 = tan(r2166843);
        double r2166845 = r2166844 * r2166844;
        double r2166846 = r2166842 - r2166845;
        double r2166847 = r2166844 + r2166841;
        double r2166848 = r2166846 / r2166847;
        double r2166849 = x;
        double r2166850 = r2166848 + r2166849;
        return r2166850;
}

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

    \[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 + \tan z}{1 - \tan y \cdot \color{blue}{\frac{\sin z}{\cos z}}} - \tan a\right)\]
  6. Applied tan-quot0.2

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

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

    \[\leadsto x + \color{blue}{\frac{\frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}} \cdot \frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}} - \tan a \cdot \tan a}{\frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}} + \tan a}}\]
  10. Final simplification0.2

    \[\leadsto \frac{\frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}} \cdot \frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}} - \tan a \cdot \tan a}{\tan a + \frac{\tan y + \tan z}{1 - \frac{\sin y \cdot \sin z}{\cos y \cdot \cos z}}} + x\]

Reproduce

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