Test Page
Jump to navigation
Jump to search
Formulae[edit | edit source]
[math]\displaystyle{ \hat{H}_\text{e} = -\sum_{i}{\frac{1}{2}\nabla_i^2} - \sum_{i,A}{\frac{Z_A}{r_{iA}}} + \sum_{i\gt j}{\frac{1}{r_{ij}}} }[/math]
[math]\displaystyle{ {}_pF_q(a_1,\dots,a_p;c_1,\dots,c_q;z) = \sum_{n=0}^\infty \frac{(a_1)_n\cdots(a_p)_n}{(c_1)_n\cdots(c_q)_n} \frac{z^n}{n!} }[/math]
[math]\displaystyle{ \begin{bmatrix} \cfrac{\partial f_1}{\partial x_1} & \cdots & \cfrac{\partial f_1}{\partial x_n} \\ \vdots & \ddots & \vdots \\ \cfrac{\partial f_m}{\partial x_1} & \cdots & \cfrac{\partial f_m}{\partial x_n} \end{bmatrix} }[/math]
The [math]\displaystyle{ (i,j) }[/math]-th entry is [math]\displaystyle{ \frac{\partial f_i}{\partial x_j} }[/math].
Source Code[edit | edit source]
int binary_search(int ary[], int key, int imin, int imax) {
if (imax < imin) {
return KEY_NOT_FOUND;
}
else {
int imid = imin + (imax - imin) / 2;
if (ary[imid] > key) {
return binary_search(ary, key, imin, imid - 1);
}
else if (ary[imid] < key) {
return binary_search(ary, key, imid + 1, imax);
}
else {
return imid;
}
}
}
subroutine swap_real(a1, a2)
implicit none
! Input/Output
real, intent(inout) :: a1(:), a2(:)
! Locals
integer :: i
real :: a
! Swap
do i = 1, min(size(a1), size(a2))
a = a1(i)
a1(i) = a2(i)
a2(i) = a
enddo
end subroutine swap_real