Average Error: 4.6 → 4.6
Time: 10.0s
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 r347649 = x;
        double r347650 = y;
        double r347651 = z;
        double r347652 = r347650 * r347651;
        double r347653 = t;
        double r347654 = r347653 / r347650;
        double r347655 = tanh(r347654);
        double r347656 = r347649 / r347650;
        double r347657 = tanh(r347656);
        double r347658 = r347655 - r347657;
        double r347659 = r347652 * r347658;
        double r347660 = r347649 + r347659;
        return r347660;
}

double f(double x, double y, double z, double t) {
        double r347661 = x;
        double r347662 = y;
        double r347663 = z;
        double r347664 = r347662 * r347663;
        double r347665 = t;
        double r347666 = r347665 / r347662;
        double r347667 = tanh(r347666);
        double r347668 = r347661 / r347662;
        double r347669 = tanh(r347668);
        double r347670 = r347667 - r347669;
        double r347671 = r347664 * r347670;
        double r347672 = r347661 + r347671;
        return r347672;
}

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