\[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 | 0.5 |
|---|
| Cost | 6984 |
|---|
\[\begin{array}{l}
t_0 := \frac{\sin y}{\frac{y}{x}}\\
\mathbf{if}\;y \leq -3.7577645386439 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 3.1728532471958 \cdot 10^{-63}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.1 |
|---|
| Cost | 6720 |
|---|
\[\frac{x}{\frac{y}{\sin y}}
\]
| Alternative 3 |
|---|
| Error | 23.8 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
t_0 := y \cdot \left(\left(1 + \frac{x}{y}\right) + -1\right)\\
\mathbf{if}\;y \leq -2.2916894560475174 \cdot 10^{+54}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.026398485657958 \cdot 10^{+26}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 23.6 |
|---|
| Cost | 704 |
|---|
\[\frac{x}{y \cdot \left(\frac{1}{y} + y \cdot 0.16666666666666666\right)}
\]
| Alternative 5 |
|---|
| Error | 24.2 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{\frac{y}{x}}\\
\mathbf{if}\;y \leq -1.2105375778933525 \cdot 10^{+32}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.9331722059281635 \cdot 10^{+64}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 23.9 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := \left(x + 1\right) + -1\\
\mathbf{if}\;y \leq -22751751.198026627:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.026398485657958 \cdot 10^{+26}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 31.2 |
|---|
| Cost | 64 |
|---|
\[x
\]