Average Error: 4.3 → 2.1
Time: 1.8m
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 r17621564 = x;
        double r17621565 = y;
        double r17621566 = z;
        double r17621567 = r17621565 * r17621566;
        double r17621568 = t;
        double r17621569 = r17621568 / r17621565;
        double r17621570 = tanh(r17621569);
        double r17621571 = r17621564 / r17621565;
        double r17621572 = tanh(r17621571);
        double r17621573 = r17621570 - r17621572;
        double r17621574 = r17621567 * r17621573;
        double r17621575 = r17621564 + r17621574;
        return r17621575;
}

double f(double x, double y, double z, double t) {
        double r17621576 = x;
        double r17621577 = y;
        double r17621578 = z;
        double r17621579 = t;
        double r17621580 = r17621579 / r17621577;
        double r17621581 = tanh(r17621580);
        double r17621582 = r17621576 / r17621577;
        double r17621583 = tanh(r17621582);
        double r17621584 = r17621581 - r17621583;
        double r17621585 = r17621578 * r17621584;
        double r17621586 = r17621577 * r17621585;
        double r17621587 = r17621576 + r17621586;
        return r17621587;
}

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.3
Target2.1
Herbie2.1
\[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.3

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

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

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