\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;x \le -7.470109407858776136532553976973323001536 \cdot 10^{104}:\\
\;\;\;\;\frac{\frac{\sin y \cdot x}{y}}{z}\\
\mathbf{elif}\;x \le 184.3916538293023563710448797792196273804:\\
\;\;\;\;\frac{\sin y}{y} \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\sin y \cdot x}{y}}{z}\\
\end{array}double f(double x, double y, double z) {
double r26346071 = x;
double r26346072 = y;
double r26346073 = sin(r26346072);
double r26346074 = r26346073 / r26346072;
double r26346075 = r26346071 * r26346074;
double r26346076 = z;
double r26346077 = r26346075 / r26346076;
return r26346077;
}
double f(double x, double y, double z) {
double r26346078 = x;
double r26346079 = -7.470109407858776e+104;
bool r26346080 = r26346078 <= r26346079;
double r26346081 = y;
double r26346082 = sin(r26346081);
double r26346083 = r26346082 * r26346078;
double r26346084 = r26346083 / r26346081;
double r26346085 = z;
double r26346086 = r26346084 / r26346085;
double r26346087 = 184.39165382930236;
bool r26346088 = r26346078 <= r26346087;
double r26346089 = r26346082 / r26346081;
double r26346090 = r26346078 / r26346085;
double r26346091 = r26346089 * r26346090;
double r26346092 = r26346088 ? r26346091 : r26346086;
double r26346093 = r26346080 ? r26346086 : r26346092;
return r26346093;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.4 |
|---|---|
| Target | 0.3 |
| Herbie | 0.4 |
if x < -7.470109407858776e+104 or 184.39165382930236 < x Initial program 0.2
rmApplied associate-*r/0.3
if -7.470109407858776e+104 < x < 184.39165382930236Initial program 3.7
rmApplied clear-num4.2
rmApplied *-un-lft-identity4.2
Applied add-cube-cbrt4.2
Applied times-frac4.2
Simplified4.2
Simplified0.4
Final simplification0.4
herbie shell --seed 2019200
(FPCore (x y z)
:name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
:herbie-target
(if (< z -4.2173720203427147e-29) (/ (* x (/ 1.0 (/ y (sin y)))) z) (if (< z 4.446702369113811e+64) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1.0 (/ y (sin y)))) z)))
(/ (* x (/ (sin y) y)) z))