\[\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 | 85.7% |
|---|
| Cost | 8460 |
|---|
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_1 := t_0 \cdot t_0 + -1\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+154}:\\
\;\;\;\;0.16666666666666666 \cdot \left(\cos x \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{+77}:\\
\;\;\;\;\frac{t_1}{\left(\mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right) + -1\right) + -1}\\
\mathbf{elif}\;y \leq -2.35 \cdot 10^{+51}:\\
\;\;\;\;\frac{1 + {\left(y \cdot y\right)}^{3} \cdot 0.004629629629629629}{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot 0.027777777777777776 + \left(1 - t_0\right)}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+77}:\\
\;\;\;\;\cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+150}:\\
\;\;\;\;\frac{t_1}{t_0 + -1}\\
\mathbf{else}:\\
\;\;\;\;\cos x \cdot \left(1 + t_0\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 84.3% |
|---|
| Cost | 8136 |
|---|
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_1 := t_0 \cdot t_0 + -1\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+154}:\\
\;\;\;\;0.16666666666666666 \cdot \left(\cos x \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{+68}:\\
\;\;\;\;\frac{t_1}{\left(\mathsf{fma}\left(y, y \cdot 0.16666666666666666, 1\right) + -1\right) + -1}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+77}:\\
\;\;\;\;\cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+150}:\\
\;\;\;\;\frac{t_1}{t_0 + -1}\\
\mathbf{else}:\\
\;\;\;\;\cos x \cdot \left(1 + t_0\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 84.3% |
|---|
| Cost | 7505 |
|---|
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;0.16666666666666666 \cdot \left(\cos x \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{+68} \lor \neg \left(y \leq 2.9 \cdot 10^{+77}\right) \land y \leq 1.5 \cdot 10^{+150}:\\
\;\;\;\;\frac{t_0 \cdot t_0 + -1}{t_0 + -1}\\
\mathbf{else}:\\
\;\;\;\;\cos x \cdot \left(1 + t_0\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 84.3% |
|---|
| Cost | 7504 |
|---|
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_1 := \frac{t_0 \cdot t_0 + -1}{t_0 + -1}\\
\mathbf{if}\;y \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;0.16666666666666666 \cdot \left(\cos x \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+77}:\\
\;\;\;\;\cos x \cdot \left(1 + y \cdot \left(y \cdot 0.16666666666666666\right)\right)\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+150}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\cos x \cdot \left(1 + t_0\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 83.9% |
|---|
| Cost | 7376 |
|---|
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_1 := 0.16666666666666666 \cdot \left(\cos x \cdot \left(y \cdot y\right)\right)\\
t_2 := \frac{t_0 \cdot t_0 + -1}{t_0 + -1}\\
\mathbf{if}\;y \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.9 \cdot 10^{+50}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 0.00023:\\
\;\;\;\;\cos x\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+150}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 77.6% |
|---|
| Cost | 6860 |
|---|
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_1 := \frac{t_0 \cdot t_0 + -1}{t_0 + -1}\\
\mathbf{if}\;y \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{+52}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 0.0005:\\
\;\;\;\;\cos x\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+150}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+172}:\\
\;\;\;\;1 + t_0\\
\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 | 55.8% |
|---|
| Cost | 1608 |
|---|
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{if}\;y \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+150}:\\
\;\;\;\;\frac{t_0 \cdot t_0 + -1}{t_0 + -1}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+174}:\\
\;\;\;\;1 + t_0\\
\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 | 51.6% |
|---|
| Cost | 1365 |
|---|
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(y \cdot y\right)\\
t_1 := y \cdot \left(y \cdot \left(0.16666666666666666 + -0.08333333333333333 \cdot \left(x \cdot x\right)\right)\right)\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+193}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -380:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+14}:\\
\;\;\;\;1 + t_0\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+154} \lor \neg \left(y \leq 5 \cdot 10^{+172}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 48.9% |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{+164}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot -0.5\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+122}:\\
\;\;\;\;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 10 |
|---|
| Accuracy | 46.1% |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+24} \lor \neg \left(y \leq 10^{+135}\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot -0.5\\
\end{array}
\]
| Alternative 11 |
|---|
| Accuracy | 46.8% |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \lor \neg \left(y \leq 1.05 \cdot 10^{+24}\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 12 |
|---|
| Accuracy | 47.9% |
|---|
| Cost | 580 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{+164}:\\
\;\;\;\;1 + \left(x \cdot x\right) \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\\
\end{array}
\]
| Alternative 13 |
|---|
| Accuracy | 28.6% |
|---|
| Cost | 64 |
|---|
\[1
\]