\[x \cdot \frac{\sin y}{y}
\]
↓
\[\frac{x}{\frac{y}{\sin y}}
\]
(FPCore (x y) :precision binary64 (* x (/ (sin y) y)))
↓
(FPCore (x y) :precision binary64 (/ x (/ y (sin y))))
double code(double x, double y) {
return x * (sin(y) / y);
}
↓
double code(double x, double y) {
return x / (y / sin(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 / (y / sin(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 / (y / Math.sin(y));
}
def code(x, y):
return x * (math.sin(y) / y)
↓
def code(x, y):
return x / (y / math.sin(y))
function code(x, y)
return Float64(x * Float64(sin(y) / y))
end
↓
function code(x, y)
return Float64(x / Float64(y / sin(y)))
end
function tmp = code(x, y)
tmp = x * (sin(y) / y);
end
↓
function tmp = code(x, y)
tmp = x / (y / sin(y));
end
code[x_, y_] := N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := N[(x / N[(y / N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot \frac{\sin y}{y}
↓
\frac{x}{\frac{y}{\sin y}}
Alternatives
| Alternative 1 |
|---|
| Error | 0.1 |
|---|
| Cost | 6720 |
|---|
\[x \cdot \frac{\sin y}{y}
\]
| Alternative 2 |
|---|
| Error | 23.0 |
|---|
| Cost | 832 |
|---|
\[\frac{\frac{1}{y}}{\frac{1}{y} + y \cdot 0.16666666666666666} \cdot x
\]
| Alternative 3 |
|---|
| Error | 23.1 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := \frac{6 \cdot \frac{x}{y}}{y}\\
\mathbf{if}\;y \leq -2.5:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2.5:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 23.0 |
|---|
| Cost | 704 |
|---|
\[\frac{x}{\left(\frac{1}{y} + 0.16666666666666666 \cdot y\right) \cdot y}
\]
| Alternative 5 |
|---|
| Error | 23.4 |
|---|
| Cost | 648 |
|---|
\[\begin{array}{l}
t_0 := -1 + \left(1 - \left(-x\right)\right)\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+46}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+32}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 24.1 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{y} \cdot y\\
\mathbf{if}\;y \leq -2 \cdot 10^{+97}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-29}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 23.4 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{\frac{y}{x}}\\
\mathbf{if}\;y \leq -3 \cdot 10^{-7}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-16}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 30.3 |
|---|
| Cost | 64 |
|---|
\[x
\]