Average Error: 4.7 → 1.9
Time: 9.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 + 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 r324393 = x;
        double r324394 = y;
        double r324395 = z;
        double r324396 = r324394 * r324395;
        double r324397 = t;
        double r324398 = r324397 / r324394;
        double r324399 = tanh(r324398);
        double r324400 = r324393 / r324394;
        double r324401 = tanh(r324400);
        double r324402 = r324399 - r324401;
        double r324403 = r324396 * r324402;
        double r324404 = r324393 + r324403;
        return r324404;
}

double f(double x, double y, double z, double t) {
        double r324405 = x;
        double r324406 = y;
        double r324407 = z;
        double r324408 = t;
        double r324409 = r324408 / r324406;
        double r324410 = tanh(r324409);
        double r324411 = r324405 / r324406;
        double r324412 = tanh(r324411);
        double r324413 = r324410 - r324412;
        double r324414 = r324407 * r324413;
        double r324415 = r324406 * r324414;
        double r324416 = r324405 + r324415;
        return r324416;
}

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
Target1.9
Herbie1.9
\[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*1.9

    \[\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 simplification1.9

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