\frac{x \cdot \frac{\sin y}{y}}{z}\frac{\frac{x}{\frac{y}{\sin y}}}{z}double f(double x, double y, double z) {
double r24765534 = x;
double r24765535 = y;
double r24765536 = sin(r24765535);
double r24765537 = r24765536 / r24765535;
double r24765538 = r24765534 * r24765537;
double r24765539 = z;
double r24765540 = r24765538 / r24765539;
return r24765540;
}
double f(double x, double y, double z) {
double r24765541 = x;
double r24765542 = y;
double r24765543 = sin(r24765542);
double r24765544 = r24765542 / r24765543;
double r24765545 = r24765541 / r24765544;
double r24765546 = z;
double r24765547 = r24765545 / r24765546;
return r24765547;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.9 |
|---|---|
| Target | 0.3 |
| Herbie | 2.9 |
Initial program 2.9
rmApplied clear-num2.9
rmApplied un-div-inv2.9
Final simplification2.9
herbie shell --seed 2019168
(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))