Intrinsic Functions
Fortran has ~200 intrinsic procedures; most are elemental (work on arrays element-wise) and generic (work for any kind).
Fortran has ~200 intrinsic procedures; most are elemental (work on arrays element-wise) and generic (work for any kind).
7.1 Numeric
abs(x), sqrt(x), exp(x), log(x), log10(x), sin(x), cos(x), tan(x), asin(x), acos(x),
atan(x), atan2(y, x), sinh(x), cosh(x), tanh(x), asinh(x), acosh(x), atanh(x),
mod(a, p), modulo(a, p), sign(a, b), dim(x, y), max(a, b, ...), min(a, b, ...),
aint(x), anint(x), int(x), nint(x), floor(x), ceiling(x), real(x), dble(x),
gamma(x), log_gamma(x), erf(x), erfc(x), bessel_j0(x), bessel_jn(n, x), hypot(x, y),
norm2(v), conjg(z), aimag(z), cmplx(x, y)
! Fortran 2023: sind, cosd, tand, asind, ... (degrees), sinpi, cospi, acospi, ...7.2 Bit manipulation
iand(i, j), ior(i, j), ieor(i, j), not(i), ishft(i, n), ishftc(i, n), btest(i, pos),
ibset(i, pos), ibclr(i, pos), popcnt(i), poppar(i), leadz(i), trailz(i), shiftl(i, n), shiftr(i, n)7.3 Inquiry & miscellaneous
present(arg), allocated(a), associated(p), size(a), shape(a), lbound(a), ubound(a),
len(s), len_trim(s), kind(x), huge(x), epsilon(x), is_contiguous(a), rank(a)
cpu_time(t), system_clock(count, rate, max), date_and_time(date, time, zone, values),
random_number(r), random_seed(), random_init(repeatable, image_distinct),
get_command(cmd), get_command_argument(i, arg), command_argument_count(),
get_environment_variable("HOME", value), execute_command_line("ls -l"),
move_alloc(from, to), transfer(source, mold)