Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\sin x \cdot \frac{\sinh y}{y}
\]
↓
\[\sin x \cdot \frac{\sinh y}{y}
\]
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y))) ↓
(FPCore (x y) :precision binary64 (* (sin x) (/ (sinh y) y))) double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
↓
double code(double x, double y) {
return sin(x) * (sinh(y) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sin(x) * (sinh(y) / y)
end function
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
↓
public static double code(double x, double y) {
return Math.sin(x) * (Math.sinh(y) / y);
}
def code(x, y):
return math.sin(x) * (math.sinh(y) / y)
↓
def code(x, y):
return math.sin(x) * (math.sinh(y) / y)
function code(x, y)
return Float64(sin(x) * Float64(sinh(y) / y))
end
↓
function code(x, y)
return Float64(sin(x) * Float64(sinh(y) / y))
end
function tmp = code(x, y)
tmp = sin(x) * (sinh(y) / y);
end
↓
function tmp = code(x, y)
tmp = sin(x) * (sinh(y) / y);
end
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := N[(N[Sin[x], $MachinePrecision] * N[(N[Sinh[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\sin x \cdot \frac{\sinh y}{y}
↓
\sin x \cdot \frac{\sinh y}{y}
Alternatives Alternative 1 Accuracy 100.0% Cost 13120
\[\sin x \cdot \frac{\sinh y}{y}
\]
Alternative 2 Accuracy 72.2% Cost 7244
\[\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+22}:\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-26}:\\
\;\;\;\;\sin x\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+167}:\\
\;\;\;\;x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(\sin x \cdot y\right)\right)\\
\end{array}
\]
Alternative 3 Accuracy 76.5% Cost 7244
\[\begin{array}{l}
t_0 := 0.16666666666666666 \cdot \left(\sin x \cdot \left(y \cdot y\right)\right)\\
\mathbf{if}\;y \leq -2.4:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-26}:\\
\;\;\;\;\sin x\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+148}:\\
\;\;\;\;x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Accuracy 76.4% Cost 6976
\[\sin x \cdot \left(1 + 0.16666666666666666 \cdot \left(y \cdot y\right)\right)
\]
Alternative 5 Accuracy 72.1% Cost 6728
\[\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+22}:\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-26}:\\
\;\;\;\;\sin x\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)\\
\end{array}
\]
Alternative 6 Accuracy 42.1% Cost 713
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+15} \lor \neg \left(y \leq 2.5\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(y \cdot \left(x \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 7 Accuracy 48.1% Cost 713
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+15} \lor \neg \left(y \leq 2.5\right):\\
\;\;\;\;0.16666666666666666 \cdot \left(x \cdot \left(y \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 8 Accuracy 48.2% Cost 576
\[x + x \cdot \left(0.16666666666666666 \cdot \left(y \cdot y\right)\right)
\]
Alternative 9 Accuracy 27.2% Cost 64
\[x
\]