Average Error: 4.8 → 2.1
Time: 7.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 r333554 = x;
        double r333555 = y;
        double r333556 = z;
        double r333557 = r333555 * r333556;
        double r333558 = t;
        double r333559 = r333558 / r333555;
        double r333560 = tanh(r333559);
        double r333561 = r333554 / r333555;
        double r333562 = tanh(r333561);
        double r333563 = r333560 - r333562;
        double r333564 = r333557 * r333563;
        double r333565 = r333554 + r333564;
        return r333565;
}

double f(double x, double y, double z, double t) {
        double r333566 = x;
        double r333567 = y;
        double r333568 = z;
        double r333569 = t;
        double r333570 = r333569 / r333567;
        double r333571 = tanh(r333570);
        double r333572 = r333566 / r333567;
        double r333573 = tanh(r333572);
        double r333574 = r333571 - r333573;
        double r333575 = r333568 * r333574;
        double r333576 = r333567 * r333575;
        double r333577 = r333566 + r333576;
        return r333577;
}

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.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.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.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 2020039 
(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))))))