Average Error: 5.0 → 2.1
Time: 24.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 r16269779 = x;
        double r16269780 = y;
        double r16269781 = z;
        double r16269782 = r16269780 * r16269781;
        double r16269783 = t;
        double r16269784 = r16269783 / r16269780;
        double r16269785 = tanh(r16269784);
        double r16269786 = r16269779 / r16269780;
        double r16269787 = tanh(r16269786);
        double r16269788 = r16269785 - r16269787;
        double r16269789 = r16269782 * r16269788;
        double r16269790 = r16269779 + r16269789;
        return r16269790;
}

double f(double x, double y, double z, double t) {
        double r16269791 = x;
        double r16269792 = y;
        double r16269793 = z;
        double r16269794 = t;
        double r16269795 = r16269794 / r16269792;
        double r16269796 = tanh(r16269795);
        double r16269797 = r16269791 / r16269792;
        double r16269798 = tanh(r16269797);
        double r16269799 = r16269796 - r16269798;
        double r16269800 = r16269793 * r16269799;
        double r16269801 = r16269792 * r16269800;
        double r16269802 = r16269791 + r16269801;
        return r16269802;
}

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

Original5.0
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 5.0

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