\frac{\cosh x \cdot \frac{y}{x}}{z}\begin{array}{l}
\mathbf{if}\;z \le -6.434118062892472 \cdot 10^{+63}:\\
\;\;\;\;\frac{\cosh x \cdot y}{x \cdot z}\\
\mathbf{elif}\;z \le 4.1988639493302256 \cdot 10^{+51}:\\
\;\;\;\;\frac{\frac{y \cdot e^{x} + \frac{y}{e^{x}}}{z}}{x \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\left(\cosh x \cdot y\right) \cdot \frac{\frac{1}{z}}{x}\\
\end{array}double f(double x, double y, double z) {
double r24275139 = x;
double r24275140 = cosh(r24275139);
double r24275141 = y;
double r24275142 = r24275141 / r24275139;
double r24275143 = r24275140 * r24275142;
double r24275144 = z;
double r24275145 = r24275143 / r24275144;
return r24275145;
}
double f(double x, double y, double z) {
double r24275146 = z;
double r24275147 = -6.434118062892472e+63;
bool r24275148 = r24275146 <= r24275147;
double r24275149 = x;
double r24275150 = cosh(r24275149);
double r24275151 = y;
double r24275152 = r24275150 * r24275151;
double r24275153 = r24275149 * r24275146;
double r24275154 = r24275152 / r24275153;
double r24275155 = 4.1988639493302256e+51;
bool r24275156 = r24275146 <= r24275155;
double r24275157 = exp(r24275149);
double r24275158 = r24275151 * r24275157;
double r24275159 = r24275151 / r24275157;
double r24275160 = r24275158 + r24275159;
double r24275161 = r24275160 / r24275146;
double r24275162 = 2.0;
double r24275163 = r24275149 * r24275162;
double r24275164 = r24275161 / r24275163;
double r24275165 = 1.0;
double r24275166 = r24275165 / r24275146;
double r24275167 = r24275166 / r24275149;
double r24275168 = r24275152 * r24275167;
double r24275169 = r24275156 ? r24275164 : r24275168;
double r24275170 = r24275148 ? r24275154 : r24275169;
return r24275170;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 7.3 |
|---|---|
| Target | 0.5 |
| Herbie | 0.5 |
if z < -6.434118062892472e+63Initial program 12.8
rmApplied associate-*r/12.8
Applied associate-/l/0.2
if -6.434118062892472e+63 < z < 4.1988639493302256e+51Initial program 1.1
rmApplied associate-*r/1.1
Applied associate-/l/14.5
rmApplied clear-num14.6
rmApplied div-inv14.7
Applied add-cube-cbrt14.7
Applied times-frac15.8
Simplified15.8
Simplified15.7
rmApplied cosh-def15.7
Applied associate-*r/15.7
Applied frac-times1.0
Simplified0.8
if 4.1988639493302256e+51 < z Initial program 12.2
rmApplied associate-*r/12.2
Applied associate-/l/0.3
rmApplied clear-num0.6
rmApplied div-inv0.7
Applied add-cube-cbrt0.7
Applied times-frac0.4
Simplified0.4
Simplified0.4
Final simplification0.5
herbie shell --seed 2019163
(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))