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 86.1% Cost 7768
\[\begin{array}{l}
t_0 := y \cdot \left(y \cdot 0.16666666666666666\right)\\
t_1 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_2 := \frac{t_0 \cdot t_0 + -1}{t_1 + -1}\\
t_3 := 1 + t_1\\
t_4 := \cos x \cdot t_3\\
t_5 := t_3 \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{+77}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -380:\\
\;\;\;\;t_5\\
\mathbf{elif}\;y \leq 33.5:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+58}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;y \leq 1.34 \cdot 10^{+154}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\]
Alternative 3 Accuracy 93.4% Cost 7765
\[\begin{array}{l}
t_0 := y \cdot \left(y \cdot 0.16666666666666666\right)\\
t_1 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_2 := \cos x \cdot \left(1 + t_1\right)\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1 \cdot 10^{+79}:\\
\;\;\;\;\frac{t_0 \cdot t_0 + -1}{t_1 + -1}\\
\mathbf{elif}\;y \leq -0.00043 \lor \neg \left(y \leq 33.5\right) \land y \leq 1.34 \cdot 10^{+154}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 4 Accuracy 93.4% Cost 7765
\[\begin{array}{l}
t_0 := y \cdot \left(y \cdot 0.16666666666666666\right)\\
t_1 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_2 := \cos x \cdot \left(1 + t_1\right)\\
t_3 := 1 + \left(x \cdot x\right) \cdot -0.5\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -4.55 \cdot 10^{+77}:\\
\;\;\;\;\frac{t_0 \cdot t_0 + -1}{t_1 + -1}\\
\mathbf{elif}\;y \leq -0.00043:\\
\;\;\;\;\frac{t_3}{\frac{y}{\sinh y}}\\
\mathbf{elif}\;y \leq 33.5 \lor \neg \left(y \leq 1.34 \cdot 10^{+154}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\sinh y}{y} \cdot t_3\\
\end{array}
\]
Alternative 5 Accuracy 79.1% Cost 6992
\[\begin{array}{l}
t_0 := y \cdot \left(y \cdot 0.16666666666666666\right)\\
t_1 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_2 := \frac{t_0 \cdot t_0 + -1}{t_1 + -1}\\
t_3 := \left(1 + t_1\right) \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{+77}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -0.00043:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 33.5:\\
\;\;\;\;\cos x\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+58} \lor \neg \left(y \leq 1.34 \cdot 10^{+154}\right):\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Accuracy 55.3% Cost 1873
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_1 := y \cdot \left(y \cdot 0.16666666666666666\right)\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{+77} \lor \neg \left(y \leq 1.5 \cdot 10^{+58}\right) \land y \leq 4.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{t_1 \cdot t_1 + -1}{t_0 + -1}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + t_0\right) \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)\\
\end{array}
\]
Alternative 7 Accuracy 49.3% Cost 960
\[\left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right) \cdot \left(1 + \left(x \cdot x\right) \cdot -0.5\right)
\]
Alternative 8 Accuracy 46.1% Cost 713
\[\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+102} \lor \neg \left(y \leq 1.5 \cdot 10^{+58}\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot -0.5\\
\end{array}
\]
Alternative 9 Accuracy 46.1% Cost 712
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+104}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+58}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;1 + t_0\\
\end{array}
\]
Alternative 10 Accuracy 46.7% Cost 585
\[\begin{array}{l}
\mathbf{if}\;y \leq -7400 \lor \neg \left(y \leq 2.65 \cdot 10^{-6}\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
Alternative 11 Accuracy 28.6% Cost 64
\[1
\]