\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;x \le -8.230194912459417 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{1}{y} \cdot \left(\sin y \cdot x\right)}{z}\\
\mathbf{elif}\;x \le 5.118933034108623 \cdot 10^{-123}:\\
\;\;\;\;x \cdot \frac{\frac{\sin y}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{y} \cdot \left(\sin y \cdot x\right)}{z}\\
\end{array}double f(double x, double y, double z) {
double r23556145 = x;
double r23556146 = y;
double r23556147 = sin(r23556146);
double r23556148 = r23556147 / r23556146;
double r23556149 = r23556145 * r23556148;
double r23556150 = z;
double r23556151 = r23556149 / r23556150;
return r23556151;
}
double f(double x, double y, double z) {
double r23556152 = x;
double r23556153 = -8.230194912459417e+102;
bool r23556154 = r23556152 <= r23556153;
double r23556155 = 1.0;
double r23556156 = y;
double r23556157 = r23556155 / r23556156;
double r23556158 = sin(r23556156);
double r23556159 = r23556158 * r23556152;
double r23556160 = r23556157 * r23556159;
double r23556161 = z;
double r23556162 = r23556160 / r23556161;
double r23556163 = 5.118933034108623e-123;
bool r23556164 = r23556152 <= r23556163;
double r23556165 = r23556158 / r23556156;
double r23556166 = r23556165 / r23556161;
double r23556167 = r23556152 * r23556166;
double r23556168 = r23556164 ? r23556167 : r23556162;
double r23556169 = r23556154 ? r23556162 : r23556168;
return r23556169;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.4 |
|---|---|
| Target | 0.3 |
| Herbie | 1.1 |
if x < -8.230194912459417e+102 or 5.118933034108623e-123 < x Initial program 0.7
rmApplied div-inv0.8
Applied associate-*r*1.7
if -8.230194912459417e+102 < x < 5.118933034108623e-123Initial program 3.9
rmApplied *-un-lft-identity3.9
Applied times-frac0.6
Simplified0.6
Final simplification1.1
herbie shell --seed 2019162
(FPCore (x y z)
:name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
: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))