Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\cos x \cdot \frac{\sinh y}{y}
\]
↓
\[\cos x \cdot \frac{\sinh y}{y}
\]
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y))) ↓
(FPCore (x y) :precision binary64 (* (cos x) (/ (sinh y) y))) double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
↓
double code(double x, double y) {
return cos(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = cos(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
↓
public static double code(double x, double y) {
return Math.cos(x) * (Math.sinh(y) / y);
}
def code(x, y):
return math.cos(x) * (math.sinh(y) / y)
↓
def code(x, y):
return math.cos(x) * (math.sinh(y) / y)
function code(x, y)
return Float64(cos(x) * Float64(sinh(y) / y))
end
↓
function code(x, y)
return Float64(cos(x) * Float64(sinh(y) / y))
end
function tmp = code(x, y)
tmp = cos(x) * (sinh(y) / y);
end
↓
function tmp = code(x, y)
tmp = cos(x) * (sinh(y) / y);
end
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := N[(N[Cos[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\cos x \cdot \frac{\sinh y}{y}
↓
\cos x \cdot \frac{\sinh y}{y}
Alternatives Alternative 1 Accuracy 100.0% Cost 13120
\[\cos x \cdot \frac{\sinh y}{y}
\]
Alternative 2 Accuracy 85.5% Cost 13585
\[\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+248}:\\
\;\;\;\;0.16666666666666666 \cdot \left(\cos x \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{+34} \lor \neg \left(y \leq 2.35 \cdot 10^{+51}\right) \land y \leq 2.65 \cdot 10^{+153}:\\
\;\;\;\;\sqrt[3]{{y}^{6} \cdot 0.004629629629629629}\\
\mathbf{else}:\\
\;\;\;\;\cos x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\end{array}
\]
Alternative 3 Accuracy 81.8% Cost 7892
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(\cos x \cdot \left(y \cdot y\right)\right)\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{+71}:\\
\;\;\;\;1 + \frac{0.027777777777777776 \cdot {y}^{4}}{y \cdot \left(y \cdot 0.16666666666666666\right)}\\
\mathbf{elif}\;y \leq -2400000000000:\\
\;\;\;\;\left(y \cdot y\right) \cdot \left|0.16666666666666666 + -0.08333333333333333 \cdot \left(x \cdot x\right)\right|\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-32}:\\
\;\;\;\;\cos x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 1.34 \cdot 10^{+154}:\\
\;\;\;\;\mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right) \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Accuracy 77.9% Cost 7244
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(\cos x \cdot \left(y \cdot y\right)\right)\\
\mathbf{if}\;y \leq -2.45:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 370:\\
\;\;\;\;\cos x\\
\mathbf{elif}\;y \leq 1.34 \cdot 10^{+154}:\\
\;\;\;\;y \cdot \left(y \cdot \left(0.16666666666666666 + -0.08333333333333333 \cdot \left(x \cdot x\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Accuracy 76.1% Cost 6976
\[\cos x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)
\]
Alternative 6 Accuracy 71.3% Cost 6728
\[\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{-5}:\\
\;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{elif}\;y \leq 620:\\
\;\;\;\;\cos x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(y \cdot \left(0.16666666666666666 + -0.08333333333333333 \cdot \left(x \cdot x\right)\right)\right)\\
\end{array}
\]
Alternative 7 Accuracy 48.7% Cost 1101
\[\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+224} \lor \neg \left(x \leq -2.6 \cdot 10^{+113}\right) \land x \leq 7.2 \cdot 10^{+168}:\\
\;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(y \cdot \left(0.16666666666666666 + -0.08333333333333333 \cdot \left(x \cdot x\right)\right)\right)\\
\end{array}
\]
Alternative 8 Accuracy 48.6% Cost 973
\[\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+224} \lor \neg \left(x \leq -2.6 \cdot 10^{+113}\right) \land x \leq 7.2 \cdot 10^{+168}:\\
\;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;-0.08333333333333333 \cdot \left(\left(y \cdot y\right) \cdot \left(x \cdot x\right)\right)\\
\end{array}
\]
Alternative 9 Accuracy 46.9% Cost 585
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.45 \lor \neg \left(y \leq 800000000000\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
Alternative 10 Accuracy 47.0% Cost 448
\[1 + 0.16666666666666666 \cdot \left(y \cdot y\right)
\]
Alternative 11 Accuracy 28.2% Cost 64
\[1
\]