Average Error: 4.7 → 2.1
Time: 29.8s
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 r260661 = x;
        double r260662 = y;
        double r260663 = z;
        double r260664 = r260662 * r260663;
        double r260665 = t;
        double r260666 = r260665 / r260662;
        double r260667 = tanh(r260666);
        double r260668 = r260661 / r260662;
        double r260669 = tanh(r260668);
        double r260670 = r260667 - r260669;
        double r260671 = r260664 * r260670;
        double r260672 = r260661 + r260671;
        return r260672;
}

double f(double x, double y, double z, double t) {
        double r260673 = x;
        double r260674 = y;
        double r260675 = z;
        double r260676 = t;
        double r260677 = r260676 / r260674;
        double r260678 = tanh(r260677);
        double r260679 = r260673 / r260674;
        double r260680 = tanh(r260679);
        double r260681 = r260678 - r260680;
        double r260682 = r260675 * r260681;
        double r260683 = r260674 * r260682;
        double r260684 = r260673 + r260683;
        return r260684;
}

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.7
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.7

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