x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)x + \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(z \cdot \left(\sqrt[3]{y} \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right)\right)(FPCore (x y z t) :precision binary64 (+ x (* (* y z) (- (tanh (/ t y)) (tanh (/ x y))))))
(FPCore (x y z t) :precision binary64 (+ x (* (* (cbrt y) (cbrt y)) (* z (* (cbrt y) (- (tanh (/ t y)) (tanh (/ x y))))))))
double code(double x, double y, double z, double t) {
return x + ((y * z) * (tanh(t / y) - tanh(x / y)));
}
double code(double x, double y, double z, double t) {
return x + ((cbrt(y) * cbrt(y)) * (z * (cbrt(y) * (tanh(t / y) - tanh(x / y)))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 4.7 |
|---|---|
| Target | 2.0 |
| Herbie | 2.1 |
Initial program 4.7
rmApplied associate-*l*_binary642.0
rmApplied add-cube-cbrt_binary642.4
Applied associate-*l*_binary642.4
Simplified2.4
rmApplied associate-*l*_binary642.1
Simplified2.1
Final simplification2.1
herbie shell --seed 2020232
(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))))))