\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;z \le -6.556330221928381769630387918095839368079 \cdot 10^{49} \lor \neg \left(z \le 2.48803922824049036872437422192558118528 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{\left(\sqrt{1} \cdot x\right) \cdot \left|\sqrt[3]{1}\right|}{z} \cdot \frac{\sqrt{\sqrt[3]{1}}}{\frac{1}{\frac{\sin y}{y}}}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{1} \cdot x\right) \cdot \frac{\sqrt{1}}{\frac{z}{\frac{\sin y}{y}}}\\
\end{array}double f(double x, double y, double z) {
double r436287 = x;
double r436288 = y;
double r436289 = sin(r436288);
double r436290 = r436289 / r436288;
double r436291 = r436287 * r436290;
double r436292 = z;
double r436293 = r436291 / r436292;
return r436293;
}
double f(double x, double y, double z) {
double r436294 = z;
double r436295 = -6.556330221928382e+49;
bool r436296 = r436294 <= r436295;
double r436297 = 2.4880392282404904e-43;
bool r436298 = r436294 <= r436297;
double r436299 = !r436298;
bool r436300 = r436296 || r436299;
double r436301 = 1.0;
double r436302 = sqrt(r436301);
double r436303 = x;
double r436304 = r436302 * r436303;
double r436305 = cbrt(r436301);
double r436306 = fabs(r436305);
double r436307 = r436304 * r436306;
double r436308 = r436307 / r436294;
double r436309 = sqrt(r436305);
double r436310 = y;
double r436311 = sin(r436310);
double r436312 = r436311 / r436310;
double r436313 = r436301 / r436312;
double r436314 = r436309 / r436313;
double r436315 = r436308 * r436314;
double r436316 = r436294 / r436312;
double r436317 = r436302 / r436316;
double r436318 = r436304 * r436317;
double r436319 = r436300 ? r436315 : r436318;
return r436319;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.8 |
|---|---|
| Target | 0.3 |
| Herbie | 0.3 |
if z < -6.556330221928382e+49 or 2.4880392282404904e-43 < z Initial program 0.1
rmApplied clear-num0.9
rmApplied *-un-lft-identity0.9
Applied times-frac6.0
Applied add-sqr-sqrt6.0
Applied times-frac5.7
Simplified5.6
rmApplied div-inv5.6
Applied add-cube-cbrt5.6
Applied sqrt-prod5.6
Applied times-frac5.2
Applied associate-*r*0.3
Simplified0.2
if -6.556330221928382e+49 < z < 2.4880392282404904e-43Initial program 5.9
rmApplied clear-num6.2
rmApplied *-un-lft-identity6.2
Applied times-frac0.7
Applied add-sqr-sqrt0.7
Applied times-frac0.5
Simplified0.4
Final simplification0.3
herbie shell --seed 1978988140
(FPCore (x y z)
:name "Linear.Quaternion:$ctanh from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< z -4.21737202034271466e-29) (/ (* x (/ 1 (/ y (sin y)))) z) (if (< z 4.44670236911381103e64) (/ x (* z (/ y (sin y)))) (/ (* x (/ 1 (/ y (sin y)))) z)))
(/ (* x (/ (sin y) y)) z))