\[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)}
\]
↓
\[\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + \left({\left(\ell \cdot \left(\frac{2}{Om} \cdot \sin ky\right)\right)}^{2} + {\left(\ell \cdot \left(\frac{2}{Om} \cdot \sin kx\right)\right)}^{2}\right)}}\right)}
\]
(FPCore (l Om kx ky)
:precision binary64
(sqrt
(*
(/ 1.0 2.0)
(+
1.0
(/
1.0
(sqrt
(+
1.0
(*
(pow (/ (* 2.0 l) Om) 2.0)
(+ (pow (sin kx) 2.0) (pow (sin ky) 2.0))))))))))↓
(FPCore (l Om kx ky)
:precision binary64
(sqrt
(*
(/ 1.0 2.0)
(+
1.0
(/
1.0
(sqrt
(+
1.0
(+
(pow (* l (* (/ 2.0 Om) (sin ky))) 2.0)
(pow (* l (* (/ 2.0 Om) (sin kx))) 2.0)))))))))double code(double l, double Om, double kx, double ky) {
return sqrt(((1.0 / 2.0) * (1.0 + (1.0 / sqrt((1.0 + (pow(((2.0 * l) / Om), 2.0) * (pow(sin(kx), 2.0) + pow(sin(ky), 2.0)))))))));
}
↓
double code(double l, double Om, double kx, double ky) {
return sqrt(((1.0 / 2.0) * (1.0 + (1.0 / sqrt((1.0 + (pow((l * ((2.0 / Om) * sin(ky))), 2.0) + pow((l * ((2.0 / Om) * sin(kx))), 2.0))))))));
}
real(8) function code(l, om, kx, ky)
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: kx
real(8), intent (in) :: ky
code = sqrt(((1.0d0 / 2.0d0) * (1.0d0 + (1.0d0 / sqrt((1.0d0 + ((((2.0d0 * l) / om) ** 2.0d0) * ((sin(kx) ** 2.0d0) + (sin(ky) ** 2.0d0)))))))))
end function
↓
real(8) function code(l, om, kx, ky)
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: kx
real(8), intent (in) :: ky
code = sqrt(((1.0d0 / 2.0d0) * (1.0d0 + (1.0d0 / sqrt((1.0d0 + (((l * ((2.0d0 / om) * sin(ky))) ** 2.0d0) + ((l * ((2.0d0 / om) * sin(kx))) ** 2.0d0))))))))
end function
public static double code(double l, double Om, double kx, double ky) {
return Math.sqrt(((1.0 / 2.0) * (1.0 + (1.0 / Math.sqrt((1.0 + (Math.pow(((2.0 * l) / Om), 2.0) * (Math.pow(Math.sin(kx), 2.0) + Math.pow(Math.sin(ky), 2.0)))))))));
}
↓
public static double code(double l, double Om, double kx, double ky) {
return Math.sqrt(((1.0 / 2.0) * (1.0 + (1.0 / Math.sqrt((1.0 + (Math.pow((l * ((2.0 / Om) * Math.sin(ky))), 2.0) + Math.pow((l * ((2.0 / Om) * Math.sin(kx))), 2.0))))))));
}
def code(l, Om, kx, ky):
return math.sqrt(((1.0 / 2.0) * (1.0 + (1.0 / math.sqrt((1.0 + (math.pow(((2.0 * l) / Om), 2.0) * (math.pow(math.sin(kx), 2.0) + math.pow(math.sin(ky), 2.0)))))))))
↓
def code(l, Om, kx, ky):
return math.sqrt(((1.0 / 2.0) * (1.0 + (1.0 / math.sqrt((1.0 + (math.pow((l * ((2.0 / Om) * math.sin(ky))), 2.0) + math.pow((l * ((2.0 / Om) * math.sin(kx))), 2.0))))))))
function code(l, Om, kx, ky)
return sqrt(Float64(Float64(1.0 / 2.0) * Float64(1.0 + Float64(1.0 / sqrt(Float64(1.0 + Float64((Float64(Float64(2.0 * l) / Om) ^ 2.0) * Float64((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))))))))
end
↓
function code(l, Om, kx, ky)
return sqrt(Float64(Float64(1.0 / 2.0) * Float64(1.0 + Float64(1.0 / sqrt(Float64(1.0 + Float64((Float64(l * Float64(Float64(2.0 / Om) * sin(ky))) ^ 2.0) + (Float64(l * Float64(Float64(2.0 / Om) * sin(kx))) ^ 2.0))))))))
end
function tmp = code(l, Om, kx, ky)
tmp = sqrt(((1.0 / 2.0) * (1.0 + (1.0 / sqrt((1.0 + ((((2.0 * l) / Om) ^ 2.0) * ((sin(kx) ^ 2.0) + (sin(ky) ^ 2.0)))))))));
end
↓
function tmp = code(l, Om, kx, ky)
tmp = sqrt(((1.0 / 2.0) * (1.0 + (1.0 / sqrt((1.0 + (((l * ((2.0 / Om) * sin(ky))) ^ 2.0) + ((l * ((2.0 / Om) * sin(kx))) ^ 2.0))))))));
end
code[l_, Om_, kx_, ky_] := N[Sqrt[N[(N[(1.0 / 2.0), $MachinePrecision] * N[(1.0 + N[(1.0 / N[Sqrt[N[(1.0 + N[(N[Power[N[(N[(2.0 * l), $MachinePrecision] / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Power[N[Sin[kx], $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[Sin[ky], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
↓
code[l_, Om_, kx_, ky_] := N[Sqrt[N[(N[(1.0 / 2.0), $MachinePrecision] * N[(1.0 + N[(1.0 / N[Sqrt[N[(1.0 + N[(N[Power[N[(l * N[(N[(2.0 / Om), $MachinePrecision] * N[Sin[ky], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(l * N[(N[(2.0 / Om), $MachinePrecision] * N[Sin[kx], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + {\left(\frac{2 \cdot \ell}{Om}\right)}^{2} \cdot \left({\sin kx}^{2} + {\sin ky}^{2}\right)}}\right)}
↓
\sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + \left({\left(\ell \cdot \left(\frac{2}{Om} \cdot \sin ky\right)\right)}^{2} + {\left(\ell \cdot \left(\frac{2}{Om} \cdot \sin kx\right)\right)}^{2}\right)}}\right)}
Alternatives
| Alternative 1 |
|---|
| Error | 1.5 |
|---|
| Cost | 40068 |
|---|
\[\begin{array}{l}
t_0 := \frac{\ell \cdot 2}{Om}\\
\mathbf{if}\;\sin kx \leq -0.1:\\
\;\;\;\;\sqrt{0.5 + \frac{0.5}{\sqrt{\frac{\left(\left(2 - \cos \left(kx + kx\right)\right) - \cos \left(ky + ky\right)\right) \cdot {t_0}^{2} + 2}{2}}}}\\
\mathbf{elif}\;\sin kx \leq 5 \cdot 10^{-180}:\\
\;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(\left(\sin ky \cdot \frac{\ell}{Om}\right) \cdot 2, 1\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(\sin kx \cdot t_0, 1\right)}}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.2 |
|---|
| Cost | 34504 |
|---|
\[\begin{array}{l}
t_0 := \frac{2 \cdot \ell}{Om}\\
t_1 := \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\sqrt{1 + \left({\left(\frac{2 \cdot \left(\ell \cdot ky\right)}{Om}\right)}^{2} + {\left(\ell \cdot \left(\frac{2}{Om} \cdot \sin kx\right)\right)}^{2}\right)}}\right)}\\
\mathbf{if}\;t_0 \leq -2 \cdot 10^{+94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_0 \leq 500000000:\\
\;\;\;\;\sqrt{0.5 + \frac{0.5}{\sqrt{\frac{\left(\left(2 - \cos \left(kx + kx\right)\right) - \cos \left(ky + ky\right)\right) \cdot {\left(\frac{\ell \cdot 2}{Om}\right)}^{2} + 2}{2}}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 3.3 |
|---|
| Cost | 33032 |
|---|
\[\begin{array}{l}
t_0 := \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(\sin kx \cdot \frac{\ell \cdot 2}{Om}, 1\right)}}\\
\mathbf{if}\;\sin kx \leq -1 \cdot 10^{-151}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\sin kx \leq 5 \cdot 10^{-255}:\\
\;\;\;\;\sqrt{0.5 + \frac{0.5}{2 \cdot \left(0.5 + {\left(\frac{\ell \cdot ky}{Om}\right)}^{2}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 1.5 |
|---|
| Cost | 20232 |
|---|
\[\begin{array}{l}
t_0 := \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(\sin kx \cdot \frac{\ell \cdot 2}{Om}, 1\right)}}\\
\mathbf{if}\;kx \leq -2:\\
\;\;\;\;t_0\\
\mathbf{elif}\;kx \leq 1.46 \cdot 10^{-179}:\\
\;\;\;\;\sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(\left(\sin ky \cdot \frac{\ell}{Om}\right) \cdot 2, 1\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 8.0 |
|---|
| Cost | 14152 |
|---|
\[\begin{array}{l}
t_0 := \sqrt{0.5 + \frac{0.5}{\mathsf{fma}\left(2, kx \cdot \left(\left(kx \cdot \ell\right) \cdot \frac{\frac{\ell}{Om}}{Om}\right), 1\right)}}\\
\mathbf{if}\;ky \leq -1 \cdot 10^{+204}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;ky \leq -5.5 \cdot 10^{-180}:\\
\;\;\;\;\sqrt{0.5 + \frac{0.5}{2 \cdot \left(0.5 + {\left(\frac{\ell \cdot ky}{Om}\right)}^{2}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 8.2 |
|---|
| Cost | 13960 |
|---|
\[\begin{array}{l}
t_0 := \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(\frac{2 \cdot \left(\ell \cdot kx\right)}{Om}, 1\right)}}\\
\mathbf{if}\;ky \leq -6.2 \cdot 10^{+202}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;ky \leq -1.25 \cdot 10^{-179}:\\
\;\;\;\;\sqrt{0.5 + \frac{0.5}{2 \cdot \left(0.5 + {\left(\frac{\ell \cdot ky}{Om}\right)}^{2}\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 9.3 |
|---|
| Cost | 13832 |
|---|
\[\begin{array}{l}
t_0 := \sqrt{0.5 + \frac{0.5}{\mathsf{hypot}\left(\frac{2 \cdot \left(\ell \cdot kx\right)}{Om}, 1\right)}}\\
\mathbf{if}\;ky \leq -8 \cdot 10^{+82}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;ky \leq -8.8 \cdot 10^{-44}:\\
\;\;\;\;\sqrt{0.5 + \frac{0.5}{1 + \frac{\left(\left(\ell \cdot \ell\right) \cdot \left(ky \cdot ky\right)\right) \cdot 2}{Om \cdot Om}}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 16.4 |
|---|
| Cost | 7880 |
|---|
\[\begin{array}{l}
\mathbf{if}\;Om \leq -1 \cdot 10^{+66}:\\
\;\;\;\;\sqrt{1}\\
\mathbf{elif}\;Om \leq 4.6 \cdot 10^{+52}:\\
\;\;\;\;\sqrt{0.5 + \frac{0.5}{1 + \frac{\left(\left(\ell \cdot \ell\right) \cdot \left(ky \cdot ky\right)\right) \cdot 2}{Om \cdot Om}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{1}\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 24.2 |
|---|
| Cost | 6464 |
|---|
\[\sqrt{1}
\]
| Alternative 10 |
|---|
| Error | 42.8 |
|---|
| Cost | 960 |
|---|
\[1 + \frac{\left(\left(\ell \cdot \ell\right) \cdot \left(kx \cdot kx\right)\right) \cdot -0.5}{Om \cdot Om}
\]