PHYS 580 COMPUTATIONAL PHYSICS SPRING 2005
Intrinsic functions for Fortran
powers
x**n = x^N (n an integer)
x**y = x^y (y a real number, x real, nonnegative)
Note: trig functions are all in radians, not degeees
sin(x)
cos(x)
tan(x)
asin(x)
atan(x)
Log function is to base e, not base 10!
log(x)
log10(x) this is log base 10!
exp(x)
Other
sqrt(x) same as x**0.5 (but more efficient)
abs(x)
real(n) or float(n) converts integer n to a real (floating point) number
int(x) converts real value to an integer value