Average Error: 4.4 → 1.9
Time: 12.9s
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 r558932 = x;
        double r558933 = y;
        double r558934 = z;
        double r558935 = r558933 * r558934;
        double r558936 = t;
        double r558937 = r558936 / r558933;
        double r558938 = tanh(r558937);
        double r558939 = r558932 / r558933;
        double r558940 = tanh(r558939);
        double r558941 = r558938 - r558940;
        double r558942 = r558935 * r558941;
        double r558943 = r558932 + r558942;
        return r558943;
}

double f(double x, double y, double z, double t) {
        double r558944 = x;
        double r558945 = y;
        double r558946 = z;
        double r558947 = t;
        double r558948 = r558947 / r558945;
        double r558949 = tanh(r558948);
        double r558950 = r558944 / r558945;
        double r558951 = tanh(r558950);
        double r558952 = r558949 - r558951;
        double r558953 = r558946 * r558952;
        double r558954 = r558945 * r558953;
        double r558955 = r558944 + r558954;
        return r558955;
}

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.4
Target1.9
Herbie1.9
\[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.4

    \[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*1.9

    \[\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 simplification1.9

    \[\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 2020042 
(FPCore (x y z t)
  :name "SynthBasics:moogVCF from YampaSynth-0.2"
  :precision binary64

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

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