\frac{\cosh x \cdot \frac{y}{x}}{z}\begin{array}{l}
\mathbf{if}\;z \le -4.7528430636640835 \cdot 10^{-45}:\\
\;\;\;\;\frac{\cosh x \cdot y}{x \cdot z}\\
\mathbf{elif}\;z \le 1.1146827486934066 \cdot 10^{-11}:\\
\;\;\;\;\frac{\frac{y}{\frac{x}{\cosh x}}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cosh x \cdot y}{x \cdot z}\\
\end{array}double f(double x, double y, double z) {
double r26082926 = x;
double r26082927 = cosh(r26082926);
double r26082928 = y;
double r26082929 = r26082928 / r26082926;
double r26082930 = r26082927 * r26082929;
double r26082931 = z;
double r26082932 = r26082930 / r26082931;
return r26082932;
}
double f(double x, double y, double z) {
double r26082933 = z;
double r26082934 = -4.7528430636640835e-45;
bool r26082935 = r26082933 <= r26082934;
double r26082936 = x;
double r26082937 = cosh(r26082936);
double r26082938 = y;
double r26082939 = r26082937 * r26082938;
double r26082940 = r26082936 * r26082933;
double r26082941 = r26082939 / r26082940;
double r26082942 = 1.1146827486934066e-11;
bool r26082943 = r26082933 <= r26082942;
double r26082944 = r26082936 / r26082937;
double r26082945 = r26082938 / r26082944;
double r26082946 = r26082945 / r26082933;
double r26082947 = r26082943 ? r26082946 : r26082941;
double r26082948 = r26082935 ? r26082941 : r26082947;
return r26082948;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 7.5 |
|---|---|
| Target | 0.4 |
| Herbie | 0.3 |
if z < -4.7528430636640835e-45 or 1.1146827486934066e-11 < z Initial program 10.7
rmApplied associate-*r/10.7
Applied associate-/l/0.4
if -4.7528430636640835e-45 < z < 1.1146827486934066e-11Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied associate-/r*0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2019168
(FPCore (x y z)
:name "Linear.Quaternion:$ctan from linear-1.19.1.3"
:herbie-target
(if (< y -4.618902267687042e-52) (* (/ (/ y z) x) (cosh x)) (if (< y 1.038530535935153e-39) (/ (/ (* (cosh x) y) x) z) (* (/ (/ y z) x) (cosh x))))
(/ (* (cosh x) (/ y x)) z))