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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 4.9 |
|---|---|
| Target | 2.0 |
| Herbie | 3.5 |
Initial program 4.9
Simplified2.0
rmApplied add-cube-cbrt2.4
Applied associate-*l*2.4
Simplified2.1
rmApplied associate-*r*3.5
Simplified3.5
Final simplification3.5
herbie shell --seed 2020182
(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))))))