\[e^{re} \cdot \sin im
\]
↓
\[e^{re} \cdot \sin im
\]
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
↓
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
double code(double re, double im) {
return exp(re) * sin(im);
}
↓
double code(double re, double im) {
return exp(re) * sin(im);
}
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = exp(re) * sin(im)
end function
↓
real(8) function code(re, im)
real(8), intent (in) :: re
real(8), intent (in) :: im
code = exp(re) * sin(im)
end function
public static double code(double re, double im) {
return Math.exp(re) * Math.sin(im);
}
↓
public static double code(double re, double im) {
return Math.exp(re) * Math.sin(im);
}
def code(re, im):
return math.exp(re) * math.sin(im)
↓
def code(re, im):
return math.exp(re) * math.sin(im)
function code(re, im)
return Float64(exp(re) * sin(im))
end
↓
function code(re, im)
return Float64(exp(re) * sin(im))
end
function tmp = code(re, im)
tmp = exp(re) * sin(im);
end
↓
function tmp = code(re, im)
tmp = exp(re) * sin(im);
end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
↓
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
e^{re} \cdot \sin im
↓
e^{re} \cdot \sin im
Alternatives
| Alternative 1 |
|---|
| Error | 0.3 |
|---|
| Cost | 13892 |
|---|
\[\begin{array}{l}
\mathbf{if}\;e^{re} \leq 0.8:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re + \left(1 + \left(re \cdot re\right) \cdot \left(0.5 + re \cdot 0.16666666666666666\right)\right)\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.4 |
|---|
| Cost | 13636 |
|---|
\[\begin{array}{l}
\mathbf{if}\;e^{re} \leq 0.8:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re + \left(1 + \left(re \cdot re\right) \cdot 0.5\right)\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.4 |
|---|
| Cost | 13636 |
|---|
\[\begin{array}{l}
\mathbf{if}\;e^{re} \leq 0.8:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(1 + re \cdot \left(1 + re \cdot 0.5\right)\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 0.5 |
|---|
| Cost | 13252 |
|---|
\[\begin{array}{l}
\mathbf{if}\;e^{re} \leq 0.8:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{else}:\\
\;\;\;\;\sin im \cdot \left(re + 1\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 1.0 |
|---|
| Cost | 13124 |
|---|
\[\begin{array}{l}
\mathbf{if}\;e^{re} \leq 0.8:\\
\;\;\;\;e^{re} \cdot im\\
\mathbf{else}:\\
\;\;\;\;\sin im\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 17.0 |
|---|
| Cost | 6596 |
|---|
\[\begin{array}{l}
\mathbf{if}\;re \leq -30302.7940565092:\\
\;\;\;\;\left(1 + \left(im + re \cdot im\right)\right) + -1\\
\mathbf{else}:\\
\;\;\;\;\sin im\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 37.6 |
|---|
| Cost | 964 |
|---|
\[\begin{array}{l}
\mathbf{if}\;re \leq -1.8870286668583574:\\
\;\;\;\;\left(1 + \left(im + re \cdot im\right)\right) + -1\\
\mathbf{else}:\\
\;\;\;\;re \cdot im + im \cdot \left(1 + \left(re \cdot re\right) \cdot 0.5\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 37.6 |
|---|
| Cost | 964 |
|---|
\[\begin{array}{l}
\mathbf{if}\;re \leq -1.8870286668583574:\\
\;\;\;\;\left(1 + \left(im + re \cdot im\right)\right) + -1\\
\mathbf{else}:\\
\;\;\;\;re \cdot im + \left(im + \left(re \cdot re\right) \cdot \left(im \cdot 0.5\right)\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 37.7 |
|---|
| Cost | 708 |
|---|
\[\begin{array}{l}
t_0 := im + re \cdot im\\
\mathbf{if}\;re \leq -30302.7940565092:\\
\;\;\;\;\left(1 + t_0\right) + -1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 42.1 |
|---|
| Cost | 64 |
|---|
\[im
\]