Average Error: 4.6 → 2.1
Time: 30.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 r18478315 = x;
        double r18478316 = y;
        double r18478317 = z;
        double r18478318 = r18478316 * r18478317;
        double r18478319 = t;
        double r18478320 = r18478319 / r18478316;
        double r18478321 = tanh(r18478320);
        double r18478322 = r18478315 / r18478316;
        double r18478323 = tanh(r18478322);
        double r18478324 = r18478321 - r18478323;
        double r18478325 = r18478318 * r18478324;
        double r18478326 = r18478315 + r18478325;
        return r18478326;
}

double f(double x, double y, double z, double t) {
        double r18478327 = x;
        double r18478328 = y;
        double r18478329 = z;
        double r18478330 = t;
        double r18478331 = r18478330 / r18478328;
        double r18478332 = tanh(r18478331);
        double r18478333 = r18478327 / r18478328;
        double r18478334 = tanh(r18478333);
        double r18478335 = r18478332 - r18478334;
        double r18478336 = r18478329 * r18478335;
        double r18478337 = r18478328 * r18478336;
        double r18478338 = r18478327 + r18478337;
        return r18478338;
}

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

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