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 -1.58715896044825459 \cdot 10^{86} \lor \neg \left(y \le 1.96443839642579 \cdot 10^{122}\right):\\
\;\;\;\;x + y \cdot \left(z \cdot \tanh \left(\frac{t}{y}\right) + -1 \cdot \frac{x \cdot z}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(\sqrt[3]{\left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)} \cdot \sqrt[3]{\left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)}\right) \cdot \sqrt[3]{\left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\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 <= -1.5871589604482546e+86) || !(y <= 1.96443839642579e+122))) {
VAR = ((double) (x + ((double) (y * ((double) (((double) (z * ((double) tanh(((double) (t / y)))))) + ((double) (-1.0 * ((double) (((double) (x * z)) / y))))))))));
} else {
VAR = ((double) (x + ((double) (((double) (((double) cbrt(((double) (((double) (y * z)) * ((double) (((double) tanh(((double) (t / y)))) - ((double) tanh(((double) (x / y)))))))))) * ((double) cbrt(((double) (((double) (y * z)) * ((double) (((double) tanh(((double) (t / y)))) - ((double) tanh(((double) (x / y)))))))))))) * ((double) cbrt(((double) (((double) (y * z)) * ((double) (((double) tanh(((double) (t / y)))) - ((double) tanh(((double) (x / y))))))))))))));
}
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.1 |
if y < -1.58715896044825459e86 or 1.96443839642579e122 < y Initial program 13.4
rmApplied associate-*l*6.3
rmApplied sub-neg6.3
Applied distribute-lft-in6.3
Taylor expanded around inf 8.0
if -1.58715896044825459e86 < y < 1.96443839642579e122Initial program 0.6
rmApplied add-cube-cbrt1.0
Final simplification3.1
herbie shell --seed 2020177
(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))))))