For example, ACOSH(1.543081), ASINH(1.175201) and ATANH(0.7615942) are all approximately equal to 1.0.
The elemental form has two arguments: N, the order of the function to compute, and X, the argument of the Bessel function. BESSEL_JN(0,X) is identical to BESSEL_J0(X), etc..
The transformational form has three scalar arguments: N1, N2 and X. The result is a vector of size MAX(N2-N1+1,0), containing approximations to the Bessel functions of orders N1 to N2 applied to X.
For example, BESSEL_JN(5,7.5) is approximately 0.283474, BESSEL_YN(5,7.5) is approximately 0.175418, BESSEL_JN(3,5,7.5) is approximately [ -0.258061, 0.023825, 0.283474 ] and BESSEL_YN(3,5,7.5) is approximately [ 0.159708, 0.314180, 0.175418 ].
The error function is the integral of −t2 from 0 to X, times 2/SQRT(π); this rapidly converges to 1. The complementary error function is 1 minus the error function, and fairly quickly converges to zero. The scaled complementary error function scales the value (of 1 minus the error function) by EXP(X**2); this also converges to zero but only very slowly.
The gamma function is the extension of factorial from the integers to the reals; for positive integers, GAMMA(X) is equal to (X−1)!, i.e. factorial of X−1. This grows very rapidly and thus overflows for quite small X; LOG_GAMMA also diverges but much more slowly.
For example, HYPOT(3e30,4e30) is approximately equal to 5e30.
The calculation of the result value is done in such a way as to avoid intermediate overflow and underflow, except when the result itself is outside the maximum range. For example, NORM2([X,Y]) is approximately the same as HYPOT(X,Y).
For example, BGE(INT(Z'FF',INT8),128) is true, while INT(Z'FF',INT8)>=128 is false.
For example, DSHIFTL(INT(B'11000101',1),B'11001001',2) has the value INT(B'00010111',1) (decimal value 23), whereas DSHIFTR(INT(B'11000101',1),B'11001001',2) has the value INT(B'01110010',1) (decimal value 114).
Note that MERGE_BITS(I,J,MASK) is identical to IOR(IAND(I,MASK),IAND(J,NOT(MASK))).
For example, MERGE_BITS(INT(B'00110011',1),B'11110000',B'10101010') is equal to INT(B'01110010') (decimal value 114).
CMDSTAT values are zero for success, −1 if command line execution is not supported, −2 if WAIT is present and false but asynchronous execution is not supported, and a positive value to indicate some other error. If CMDSTAT is not present but would have been set non-zero, the program will be terminated. Note that Release 5.3.1 supports command line execution on all systems, and does not support asynchronous execution on any system.
For example, CALL EXECUTE_COMMAND_LINE('echo Hello') will probably display ‘Hello’ in the console window.
If A is allocatable or a pointer, it does not have to be allocated unless it has a deferred type parameter (e.g. CHARACTER(:)) or is CLASS(*). If it is a polymorphic pointer, it must not have an undefined status.
For example, STORAGE_SIZE(13_1) is equal to 8 (bits).
For example, the value of
MAXVAL( [ 5,1,5 ], BACK=.TRUE.)is the array [ 3 ], rather than [ 1 ].
INTERFACE c_sizeof PURE INTEGER(c_size_t) FUNCTION c_sizeof...(x) ! Specific name not visible TYPE(*) :: x(..) END FUNCTION END INTERFACE
The actual argument x must be interoperable. The result is the same as the C sizeof operator applied to the conceptually corresponding C entity; that is, the size of x in bytes. If x is an array, it is the size of the whole array, not just one element. Note that x cannot be an assumed-size array.
[6.1] The standard intrinsic module ISO_FORTRAN_ENV contains two new functions as follows.
Module version_info Use Iso_Fortran_Env Character(Len(Compiler_Version())) :: compiler = Compiler_Version() End Module Program show_version_info Use version_info Print *,compiler End ProgramWith release 6.1 of the NAG Fortran Compiler, this program will print something like
NAG Fortran Compiler Release 6.1(Tozai) Build 6105
Module options_info Use Iso_Fortran_Env Character(Len(Compiler_Options())) :: compiler = Compiler_Options() End Module Program show_options_info Use options_info Print *,compiler End ProgramIf compiled with the options -C=array -C=pointer -O, this program will print something like
-C=array -C=pointer -O