Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[x \cdot \frac{\sin y}{y}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.513357304447594 \cdot 10^{-5}:\\
\;\;\;\;\frac{x \cdot \sin y}{y}\\
\mathbf{elif}\;y \leq 5.1180502069597055 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\sin y \cdot \frac{x}{y}\\
\end{array}
\]
(FPCore (x y) :precision binary64 (* x (/ (sin y) y))) ↓
(FPCore (x y)
:precision binary64
(if (<= y -1.513357304447594e-5)
(/ (* x (sin y)) y)
(if (<= y 5.1180502069597055e-20) x (* (sin y) (/ x y))))) double code(double x, double y) {
return x * (sin(y) / y);
}
↓
double code(double x, double y) {
double tmp;
if (y <= -1.513357304447594e-5) {
tmp = (x * sin(y)) / y;
} else if (y <= 5.1180502069597055e-20) {
tmp = x;
} else {
tmp = sin(y) * (x / y);
}
return tmp;
}
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
real(8) :: tmp
if (y <= (-1.513357304447594d-5)) then
tmp = (x * sin(y)) / y
else if (y <= 5.1180502069597055d-20) then
tmp = x
else
tmp = sin(y) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
return x * (Math.sin(y) / y);
}
↓
public static double code(double x, double y) {
double tmp;
if (y <= -1.513357304447594e-5) {
tmp = (x * Math.sin(y)) / y;
} else if (y <= 5.1180502069597055e-20) {
tmp = x;
} else {
tmp = Math.sin(y) * (x / y);
}
return tmp;
}
def code(x, y):
return x * (math.sin(y) / y)
↓
def code(x, y):
tmp = 0
if y <= -1.513357304447594e-5:
tmp = (x * math.sin(y)) / y
elif y <= 5.1180502069597055e-20:
tmp = x
else:
tmp = math.sin(y) * (x / y)
return tmp
function code(x, y)
return Float64(x * Float64(sin(y) / y))
end
↓
function code(x, y)
tmp = 0.0
if (y <= -1.513357304447594e-5)
tmp = Float64(Float64(x * sin(y)) / y);
elseif (y <= 5.1180502069597055e-20)
tmp = x;
else
tmp = Float64(sin(y) * Float64(x / y));
end
return tmp
end
function tmp = code(x, y)
tmp = x * (sin(y) / y);
end
↓
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= -1.513357304447594e-5)
tmp = (x * sin(y)) / y;
elseif (y <= 5.1180502069597055e-20)
tmp = x;
else
tmp = sin(y) * (x / y);
end
tmp_2 = tmp;
end
code[x_, y_] := N[(x * N[(N[Sin[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := If[LessEqual[y, -1.513357304447594e-5], N[(N[(x * N[Sin[y], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 5.1180502069597055e-20], x, N[(N[Sin[y], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
x \cdot \frac{\sin y}{y}
↓
\begin{array}{l}
\mathbf{if}\;y \leq -1.513357304447594 \cdot 10^{-5}:\\
\;\;\;\;\frac{x \cdot \sin y}{y}\\
\mathbf{elif}\;y \leq 5.1180502069597055 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\sin y \cdot \frac{x}{y}\\
\end{array}
Alternatives Alternative 1 Error 0.2 Cost 6984
\[\begin{array}{l}
t_0 := \sin y \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -1.513357304447594 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 5.1180502069597055 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 2 Error 0.1 Cost 6720
\[x \cdot \frac{\sin y}{y}
\]
Alternative 3 Error 23.4 Cost 840
\[\begin{array}{l}
t_0 := \frac{1}{0.16666666666666666 \cdot \left(y \cdot \frac{y}{x}\right)}\\
\mathbf{if}\;y \leq -159.7043585464012:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 0.05641409254771451:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Error 23.4 Cost 712
\[\begin{array}{l}
t_0 := x \cdot \frac{6}{y \cdot y}\\
\mathbf{if}\;y \leq -159.7043585464012:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 0.05641409254771451:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Error 23.3 Cost 704
\[\frac{x}{y \cdot \left(\frac{1}{y} + y \cdot 0.16666666666666666\right)}
\]
Alternative 6 Error 23.6 Cost 584
\[\begin{array}{l}
t_0 := \left(x + 1\right) + -1\\
\mathbf{if}\;y \leq -1.2768787602011338 \cdot 10^{+20}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 10598571496.341658:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 7 Error 31.1 Cost 64
\[x
\]