Average Error: 4.6 → 2.0
Time: 55.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 r312188 = x;
        double r312189 = y;
        double r312190 = z;
        double r312191 = r312189 * r312190;
        double r312192 = t;
        double r312193 = r312192 / r312189;
        double r312194 = tanh(r312193);
        double r312195 = r312188 / r312189;
        double r312196 = tanh(r312195);
        double r312197 = r312194 - r312196;
        double r312198 = r312191 * r312197;
        double r312199 = r312188 + r312198;
        return r312199;
}

double f(double x, double y, double z, double t) {
        double r312200 = x;
        double r312201 = y;
        double r312202 = z;
        double r312203 = t;
        double r312204 = r312203 / r312201;
        double r312205 = tanh(r312204);
        double r312206 = r312200 / r312201;
        double r312207 = tanh(r312206);
        double r312208 = r312205 - r312207;
        double r312209 = r312202 * r312208;
        double r312210 = r312201 * r312209;
        double r312211 = r312200 + r312210;
        return r312211;
}

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.6
Target2.0
Herbie2.0
\[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.6

    \[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.0

    \[\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.0

    \[\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 2019297 
(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))))))