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(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \left(\sqrt[3]{z} \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right)\right)double code(double x, double y, double z, double t) {
return ((double) (x + ((double) (((double) (y * z)) * ((double) (((double) tanh(((double) (t / y)))) - ((double) tanh(((double) (x / y))))))))));
}
double code(double x, double y, double z, double t) {
return ((double) (x + ((double) (y * ((double) (((double) (((double) cbrt(z)) * ((double) cbrt(z)))) * ((double) (((double) cbrt(z)) * ((double) (((double) tanh(((double) (t / y)))) - ((double) tanh(((double) (x / y))))))))))))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 4.6 |
|---|---|
| Target | 1.9 |
| Herbie | 2.3 |
Initial program 4.6
rmApplied associate-*l*1.9
rmApplied add-cube-cbrt2.3
Applied associate-*l*2.3
Final simplification2.3
herbie shell --seed 2020162
(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))))))