\frac{x \cdot \frac{\sin y}{y}}{z}\begin{array}{l}
\mathbf{if}\;x \le 2.843405087967007653899124626840383149923 \cdot 10^{134}:\\
\;\;\;\;\frac{x}{z \cdot \frac{y}{\sin y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x \cdot \sin y}{y}}{z}\\
\end{array}double f(double x, double y, double z) {
double r345442 = x;
double r345443 = y;
double r345444 = sin(r345443);
double r345445 = r345444 / r345443;
double r345446 = r345442 * r345445;
double r345447 = z;
double r345448 = r345446 / r345447;
return r345448;
}
double f(double x, double y, double z) {
double r345449 = x;
double r345450 = 2.8434050879670077e+134;
bool r345451 = r345449 <= r345450;
double r345452 = z;
double r345453 = y;
double r345454 = sin(r345453);
double r345455 = r345453 / r345454;
double r345456 = r345452 * r345455;
double r345457 = r345449 / r345456;
double r345458 = r345449 * r345454;
double r345459 = r345458 / r345453;
double r345460 = r345459 / r345452;
double r345461 = r345451 ? r345457 : r345460;
return r345461;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.7 |
|---|---|
| Target | 0.3 |
| Herbie | 1.6 |
if x < 2.8434050879670077e+134Initial program 3.0
rmApplied associate-/l*1.8
Simplified1.8
if 2.8434050879670077e+134 < x Initial program 0.3
rmApplied pow10.3
Applied pow10.3
Applied pow-prod-down0.3
Simplified0.3
Final simplification1.6
herbie shell --seed 2019323 +o rules:numerics
(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))