2008-03-13

Programming in Fortran

# real -> integer
ceiling -> +inf
floor -> -inf
aint (dint) -> 0
anint (dnint) -> round off
nint (idnint) -> round off

atan2(y,x) ! atan(y/x) in [-pi,pi]

shape ! dimension
size ! nr. of elements

dot_product(v1, v2) ! dot product
dprod(x,y) ! double-precision product
matmul(m1, m2) ! matrix multiply

pi = dacos(-1d0)
pi = acos(-1e0)



Compaq Visual Fortran

File - New - Projects - Fortran Console Application
File - New - Fortran

Project - Setting - Fortran - -optimize:5
Build - Set Active Configuration - Win32 Release/Debug

Compile
Debug
Profile

! keyboard
Build
Compile
Execute

No comments: