\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;x \le -3.537263057677357 \cdot 10^{-28}:\\
\;\;\;\;\frac{x \cdot \frac{\sin y}{y}}{z}\\
\mathbf{elif}\;x \le 3.8285680046076358 \cdot 10^{167}:\\
\;\;\;\;\frac{x}{\frac{z}{\frac{\sin y}{y}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z}{x \cdot \frac{\sin y}{y}}}\\
\end{array}double f(double x, double y, double z) {
double r610215 = x;
double r610216 = y;
double r610217 = sin(r610216);
double r610218 = r610217 / r610216;
double r610219 = r610215 * r610218;
double r610220 = z;
double r610221 = r610219 / r610220;
return r610221;
}
double f(double x, double y, double z) {
double r610222 = x;
double r610223 = -3.5372630576773575e-28;
bool r610224 = r610222 <= r610223;
double r610225 = y;
double r610226 = sin(r610225);
double r610227 = r610226 / r610225;
double r610228 = r610222 * r610227;
double r610229 = z;
double r610230 = r610228 / r610229;
double r610231 = 3.828568004607636e+167;
bool r610232 = r610222 <= r610231;
double r610233 = r610229 / r610227;
double r610234 = r610222 / r610233;
double r610235 = 1.0;
double r610236 = r610229 / r610228;
double r610237 = r610235 / r610236;
double r610238 = r610232 ? r610234 : r610237;
double r610239 = r610224 ? r610230 : r610238;
return r610239;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.6 |
|---|---|
| Target | 0.3 |
| Herbie | 0.6 |
if x < -3.5372630576773575e-28Initial program 0.2
rmApplied associate-/l*5.5
rmApplied associate-/r/5.7
rmApplied associate-*l/0.2
if -3.5372630576773575e-28 < x < 3.828568004607636e+167Initial program 3.9
rmApplied associate-/l*0.7
if 3.828568004607636e+167 < x Initial program 0.2
rmApplied clear-num0.4
Final simplification0.6
herbie shell --seed 2020047
(FPCore (x y z)
:name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< z -4.2173720203427147e-29) (/ (* x (/ 1 (/ y (sin y)))) z) (if (< z 4.446702369113811e+64) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1 (/ y (sin y)))) z)))
(/ (* x (/ (sin y) y)) z))