Average Error: 4.8 → 2.2
Time: 30.5s
Precision: 64
\[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\]
\[x + y \cdot \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right)\]
x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)
x + y \cdot \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right)
double f(double x, double y, double z, double t) {
        double r282902 = x;
        double r282903 = y;
        double r282904 = z;
        double r282905 = r282903 * r282904;
        double r282906 = t;
        double r282907 = r282906 / r282903;
        double r282908 = tanh(r282907);
        double r282909 = r282902 / r282903;
        double r282910 = tanh(r282909);
        double r282911 = r282908 - r282910;
        double r282912 = r282905 * r282911;
        double r282913 = r282902 + r282912;
        return r282913;
}

double f(double x, double y, double z, double t) {
        double r282914 = x;
        double r282915 = y;
        double r282916 = z;
        double r282917 = t;
        double r282918 = r282917 / r282915;
        double r282919 = tanh(r282918);
        double r282920 = r282914 / r282915;
        double r282921 = tanh(r282920);
        double r282922 = r282919 - r282921;
        double r282923 = r282916 * r282922;
        double r282924 = r282915 * r282923;
        double r282925 = r282914 + r282924;
        return r282925;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original4.8
Target2.2
Herbie2.2
\[x + y \cdot \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right)\]

Derivation

  1. Initial program 4.8

    \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\]
  2. Using strategy rm
  3. Applied associate-*l*2.2

    \[\leadsto x + \color{blue}{y \cdot \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right)}\]
  4. Final simplification2.2

    \[\leadsto x + y \cdot \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right)\]

Reproduce

herbie shell --seed 2019196 
(FPCore (x y z t)
  :name "SynthBasics:moogVCF from YampaSynth-0.2"

  :herbie-target
  (+ x (* y (* z (- (tanh (/ t y)) (tanh (/ x y))))))

  (+ x (* (* y z) (- (tanh (/ t y)) (tanh (/ x y))))))