x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\begin{array}{l}
\mathbf{if}\;y \le -2.00905380261296578 \cdot 10^{47} \lor \neg \left(y \le 45574721038.576889\right):\\
\;\;\;\;x + \left(\left({\left(\sqrt[3]{y}\right)}^{3} \cdot \tanh \left(\frac{t}{y}\right)\right) \cdot z + -1 \cdot \left(x \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \sqrt[3]{{\left(\tanh \left(\frac{x}{y}\right)\right)}^{3}}\right)\\
\end{array}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) {
double VAR;
if (((y <= -2.0090538026129658e+47) || !(y <= 45574721038.57689))) {
VAR = ((double) (x + ((double) (((double) (((double) (((double) pow(((double) cbrt(y)), 3.0)) * ((double) tanh(((double) (t / y)))))) * z)) + ((double) (-1.0 * ((double) (x * z))))))));
} else {
VAR = ((double) (x + ((double) (((double) (y * z)) * ((double) (((double) tanh(((double) (t / y)))) - ((double) cbrt(((double) pow(((double) tanh(((double) (x / y)))), 3.0))))))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 4.4 |
|---|---|
| Target | 1.9 |
| Herbie | 3.9 |
if y < -2.00905380261296578e47 or 45574721038.576889 < y Initial program 10.8
rmApplied associate-*l*4.6
rmApplied add-cube-cbrt5.0
Applied associate-*l*5.1
rmApplied sub-neg5.1
Applied distribute-lft-in5.1
Applied distribute-lft-in5.2
Applied distribute-lft-in5.5
Simplified4.6
Simplified4.6
Taylor expanded around 0 8.5
if -2.00905380261296578e47 < y < 45574721038.576889Initial program 0.1
rmApplied add-cbrt-cube0.7
Simplified0.7
Final simplification3.9
herbie shell --seed 2020148
(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))))))