Average Error: 4.6 → 4.6
Time: 10.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 + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\]
x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)
x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)
double f(double x, double y, double z, double t) {
        double r337648 = x;
        double r337649 = y;
        double r337650 = z;
        double r337651 = r337649 * r337650;
        double r337652 = t;
        double r337653 = r337652 / r337649;
        double r337654 = tanh(r337653);
        double r337655 = r337648 / r337649;
        double r337656 = tanh(r337655);
        double r337657 = r337654 - r337656;
        double r337658 = r337651 * r337657;
        double r337659 = r337648 + r337658;
        return r337659;
}

double f(double x, double y, double z, double t) {
        double r337660 = x;
        double r337661 = y;
        double r337662 = z;
        double r337663 = r337661 * r337662;
        double r337664 = t;
        double r337665 = r337664 / r337661;
        double r337666 = tanh(r337665);
        double r337667 = r337660 / r337661;
        double r337668 = tanh(r337667);
        double r337669 = r337666 - r337668;
        double r337670 = r337663 * r337669;
        double r337671 = r337660 + r337670;
        return r337671;
}

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.1
Herbie4.6
\[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. Final simplification4.6

    \[\leadsto x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\]

Reproduce

herbie shell --seed 2020001 
(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))))))