\[x \cdot \frac{\sin y}{y}
\]
↓
\[x \cdot \frac{\sin y}{y}
\]
(FPCore (x y) :precision binary64 (* x (/ (sin y) y)))
↓
(FPCore (x y) :precision binary64 (* x (/ (sin y) y)))
double code(double x, double y) {
return x * (sin(y) / y);
}
↓
double code(double x, double y) {
return x * (sin(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x * (sin(y) / y)
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x * (sin(y) / y)
end function
public static double code(double x, double y) {
return x * (Math.sin(y) / y);
}
↓
public static double code(double x, double y) {
return x * (Math.sin(y) / y);
}
def code(x, y):
return x * (math.sin(y) / y)
↓
def code(x, y):
return x * (math.sin(y) / y)
function code(x, y)
return Float64(x * Float64(sin(y) / y))
end
↓
function code(x, y)
return Float64(x * Float64(sin(y) / y))
end
function tmp = code(x, y)
tmp = x * (sin(y) / y);
end
↓
function tmp = code(x, y)
tmp = x * (sin(y) / y);
end
code[x_, y_] := N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
x \cdot \frac{\sin y}{y}
↓
x \cdot \frac{\sin y}{y}
Alternatives
| Alternative 1 |
|---|
| Error | 23.8 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+18}:\\
\;\;\;\;6 \cdot \frac{x}{y \cdot y}\\
\mathbf{elif}\;y \leq 6.3:\\
\;\;\;\;x \cdot \left(1 + \left(y \cdot y\right) \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{6}{y}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 23.8 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+18}:\\
\;\;\;\;6 \cdot \frac{x}{y \cdot y}\\
\mathbf{elif}\;y \leq 6.3:\\
\;\;\;\;x + \left(y \cdot y\right) \cdot \left(x \cdot -0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{6}{y}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 24.0 |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \lor \neg \left(y \leq 2.45\right):\\
\;\;\;\;6 \cdot \frac{x}{y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 24.0 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.5:\\
\;\;\;\;6 \cdot \frac{x}{y \cdot y}\\
\mathbf{elif}\;y \leq 2.45:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{6}{y}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 24.2 |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+32} \lor \neg \left(y \leq 12500\right):\\
\;\;\;\;\left(x + 1\right) + -1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 23.8 |
|---|
| Cost | 576 |
|---|
\[\frac{x}{1 + y \cdot \left(y \cdot 0.16666666666666666\right)}
\]
| Alternative 7 |
|---|
| Error | 31.2 |
|---|
| Cost | 64 |
|---|
\[x
\]