@@ -77,8 +77,12 @@ and editing. All contributions and corrections are strongly encouraged.
77
77
* @code {DPROD } : DPROD, Double product function
78
78
* @code {DREAL } : DREAL, Double real part function
79
79
* @code {DTIME } : DTIME, Execution time subroutine (or function)
80
+ * @code {EOSHIFT } : EOSHIFT, End-off shift function
81
+ * @code {EPSILON } : EPSILON, Epsilon function
80
82
* @code {ERF } : ERF, Error function
81
83
* @code {ERFC } : ERFC, Complementary error function
84
+ * @code {ETIME } : ETIME, Execution time subroutine (or function)
85
+ * @code {EXIT } : EXIT, Exit the program with status .
82
86
* @code {EXP } : EXP, Cosine function
83
87
* @code {LOG } : LOG, Logarithm function
84
88
* @code {LOG10 } : LOG10, Base 10 logarithm function
@@ -665,8 +669,8 @@ end program test_anint
665
669
666
670
@table @asis
667
671
@item @emph {Description }:
668
- @code {ANY(MASK [ , DIM]) } determines if any of the values in the logical array @var { MASK }
669
- along dimension @var {DIM } are @code {.TRUE. }.
672
+ @code {ANY(MASK [ , DIM]) } determines if any of the values in the logical array
673
+ @var { MASK } along dimension @var {DIM } are @code {.TRUE. }.
670
674
671
675
@item @emph {Option }:
672
676
f95, gnu
@@ -1225,7 +1229,8 @@ end program test_besyn
1225
1229
1226
1230
@table @asis
1227
1231
@item @emph {Description }:
1228
- @code {BIT_SIZE(I) } returns the number of bits (integer precision plus sign bit) represented by the type of @var {I }.
1232
+ @code {BIT_SIZE(I) } returns the number of bits (integer precision plus sign bit)
1233
+ represented by the type of @var {I }.
1229
1234
1230
1235
@item @emph {Option }:
1231
1236
f95, gnu
@@ -1264,7 +1269,8 @@ end program test_bit_size
1264
1269
1265
1270
@table @asis
1266
1271
@item @emph {Description }:
1267
- @code {BTEST(I ,POS) } returns logical .TRUE. if the bit at @var {POS } in @var {I } is set.
1272
+ @code {BTEST(I ,POS) } returns logical @code {.TRUE. } if the bit at @var {POS }
1273
+ in @var {I } is set.
1268
1274
1269
1275
@item @emph {Option }:
1270
1276
f95, gnu
@@ -1964,7 +1970,6 @@ program test_digits
1964
1970
integer :: i = 12345
1965
1971
real :: x = 3.143
1966
1972
real(8) :: y = 2.33
1967
- complex :: z = (23.0,45.6)
1968
1973
print *, digits(i)
1969
1974
print *, digits(x)
1970
1975
print *, digits(y)
@@ -2166,9 +2171,11 @@ end program test_dreal
2166
2171
@code {DTIME(TARRAY , RESULT) } initially returns the number of seconds of runtime
2167
2172
since the start of the process's execution in @var {RESULT }. @var {TARRAY }
2168
2173
returns the user and system components of this time in @code {TARRAY(1) } and
2169
- @code {TARRAY(2) } respectively. @var {RESULT } is equal to @code {TARRAY(1) + TARRAY(2) }.
2174
+ @code {TARRAY(2) } respectively. @var {RESULT } is equal to @code {TARRAY(1) +
2175
+ TARRAY(2) }.
2170
2176
2171
- Subsequent invocations of @code {DTIME } return values accumulated since the previous invocation.
2177
+ Subsequent invocations of @code {DTIME } return values accumulated since the
2178
+ previous invocation.
2172
2179
2173
2180
On some systems, the underlying timings are represented using types with
2174
2181
sufficiently small limits that overflows (wraparounds) are possible, such as
@@ -2194,8 +2201,10 @@ gnu
2194
2201
subroutine
2195
2202
2196
2203
@item @emph {Syntax }:
2197
- @code {CALL DTIME(TARRAY , RESULT) }
2198
- @code {RESULT = DTIME(TARRAY) }, (not recommended)
2204
+ @multitable @columnfractions .80
2205
+ @item @code {CALL DTIME(TARRAY , RESULT) }.
2206
+ @item @code {RESULT = DTIME(TARRAY) }, (not recommended).
2207
+ @end multitable
2199
2208
2200
2209
@item @emph {Arguments }:
2201
2210
@multitable @columnfractions .15 .80
@@ -2229,6 +2238,110 @@ end program test_dtime
2229
2238
2230
2239
2231
2240
2241
+ @node EOSHIFT
2242
+ @section @code {EOSHIFT } --- End-off shift function
2243
+ @findex @code {EOSHIFT } intrinsic
2244
+ @cindex eoshift intrinsic
2245
+
2246
+ @table @asis
2247
+ @item @emph {Description }:
2248
+ @code {EOSHIFT(ARRAY , SHIFT[ ,BOUNDARY , DIM]) } performs an end-off shift on
2249
+ elements of @var {ARRAY } along the dimension of @var {DIM }. If @var {DIM } is
2250
+ omitted it is taken to be @code {1 }. @var {DIM } is a scaler of type
2251
+ @code {INTEGER } in the range of @math {1 /leq DIM /leq n) } where @math {n } is the
2252
+ rank of @var {ARRAY }. If the rank of @var {ARRAY } is one, then all elements of
2253
+ @var {ARRAY } are shifted by @var {SHIFT } places. If rank is greater than one,
2254
+ then all complete rank one sections of @var {ARRAY } along the given dimension are
2255
+ shifted. Elements shifted out one end of each rank one section are dropped. If
2256
+ @var {BOUNDARY } is present then the cooresponding value of from @var {BOUNDARY }
2257
+ is copied back in the other end. If @var {BOUNDARY } is not present then the
2258
+ following are copied in depending on the type of @var {ARRAY }.
2259
+
2260
+ @multitable @columnfractions .15 .80
2261
+ @item @emph {Array Type } @tab @emph {Boundary Value }
2262
+ @item Numeric @tab 0 of the type and kind of @var {ARRAY }.
2263
+ @item Logical @tab @code {.FALSE. }.
2264
+ @item Character(@var {len }) @tab @var {len } blanks.
2265
+ @end multitable
2266
+
2267
+ @item @emph {Option }:
2268
+ f95, gnu
2269
+
2270
+ @item @emph {Class }:
2271
+ transformational function
2272
+
2273
+ @item @emph {Syntax }:
2274
+ @code {A = EOSHIFT(A , SHIFT[ ,BOUNDARY , DIM]) }
2275
+
2276
+ @item @emph {Arguments }:
2277
+ @multitable @columnfractions .15 .80
2278
+ @item @var {ARRAY } @tab May be any type, not scaler.
2279
+ @item @var {SHIFT } @tab The type shall be @code {INTEGER }.
2280
+ @item @var {BOUNDARY } @tab Same type as @var {ARRAY }.
2281
+ @item @var {DIM } @tab The type shall be @code {INTEGER }.
2282
+ @end multitable
2283
+
2284
+ @item @emph {Return value }:
2285
+ Returns an array of same type and rank as the @var {ARRAY } argument.
2286
+
2287
+ @item @emph {Example }:
2288
+ @smallexample
2289
+ program test_eoshift
2290
+ integer, dimension(3,3) :: a
2291
+ a = reshape( (/ 1, 2, 3, 4, 5, 6, 7, 8, 9 /), (/ 3, 3 /))
2292
+ print '(3i3)', a(1,:)
2293
+ print '(3i3)', a(2,:)
2294
+ print '(3i3)', a(3,:)
2295
+ a = EOSHIFT(a, SHIFT=(/1, 2, 1/), BOUNDARY=-5, DIM=2)
2296
+ print *
2297
+ print '(3i3)', a(1,:)
2298
+ print '(3i3)', a(2,:)
2299
+ print '(3i3)', a(3,:)
2300
+ end program test_eoshift
2301
+ @end smallexample
2302
+ @end table
2303
+
2304
+
2305
+
2306
+ @node EPSILON
2307
+ @section @code {EPSILON } --- Epsilon function
2308
+ @findex @code {EPSILON } intrinsic
2309
+ @cindex epsilon , significant
2310
+
2311
+ @table @asis
2312
+ @item @emph {Description }:
2313
+ @code {EPSILON(X) } returns a nearly negligible number relative to @code {1 }.
2314
+
2315
+ @item @emph {Option }:
2316
+ f95, gnu
2317
+
2318
+ @item @emph {Class }:
2319
+ inquiry function
2320
+
2321
+ @item @emph {Syntax }:
2322
+ @code {C = EPSILON(X) }
2323
+
2324
+ @item @emph {Arguments }:
2325
+ @multitable @columnfractions .15 .80
2326
+ @item @var {X } @tab The type shall be @code {REAL(*) }.
2327
+ @end multitable
2328
+
2329
+ @item @emph {Return value }:
2330
+ The return value is of same type as the argument.
2331
+
2332
+ @item @emph {Example }:
2333
+ @smallexample
2334
+ program test_epsilon
2335
+ real :: x = 3.143
2336
+ real(8) :: y = 2.33
2337
+ print *, EPSILON(x)
2338
+ print *, EPSILON(y)
2339
+ end program test_epsilon
2340
+ @end smallexample
2341
+ @end table
2342
+
2343
+
2344
+
2232
2345
@node ERF
2233
2346
@section @code {ERF } --- Error function
2234
2347
@findex @code {ERF } intrinsic
@@ -2317,6 +2430,119 @@ end program test_erfc
2317
2430
2318
2431
2319
2432
2433
+ @node ETIME
2434
+ @section @code {ETIME } --- Execution time subroutine (or function)
2435
+ @findex @code {ETIME } intrinsic
2436
+ @cindex ETIME subroutine
2437
+
2438
+ @table @asis
2439
+ @item @emph {Description }:
2440
+ @code {ETIME(TARRAY , RESULT) } returns the number of seconds of runtime
2441
+ since the start of the process's execution in @var {RESULT }. @var {TARRAY }
2442
+ returns the user and system components of this time in @code {TARRAY(1) } and
2443
+ @code {TARRAY(2) } respectively. @var {RESULT } is equal to @code {TARRAY(1) + TARRAY(2) }.
2444
+
2445
+ On some systems, the underlying timings are represented using types with
2446
+ sufficiently small limits that overflows (wraparounds) are possible, such as
2447
+ 32-bit types. Therefore, the values returned by this intrinsic might be, or
2448
+ become, negative, or numerically less than previous values, during a single
2449
+ run of the compiled program.
2450
+
2451
+ If @code {ETIME } is invoked as a function, it can not be invoked as a
2452
+ subroutine, and vice versa.
2453
+
2454
+ @var {TARRAY } and @var {RESULT } are @code {INTENT(OUT) } and provide the following:
2455
+
2456
+ @multitable @columnfractions .15 .30 .60
2457
+ @item @tab @code {TARRAY(1) }: @tab User time in seconds.
2458
+ @item @tab @code {TARRAY(2) }: @tab System time in seconds.
2459
+ @item @tab @code {RESULT }: @tab Run time since start in seconds.
2460
+ @end multitable
2461
+
2462
+ @item @emph {Option }:
2463
+ gnu
2464
+
2465
+ @item @emph {Class }:
2466
+ subroutine
2467
+
2468
+ @item @emph {Syntax }:
2469
+ @multitable @columnfractions .8
2470
+ @item @code {CALL ETIME(TARRAY , RESULT) }.
2471
+ @item @code {RESULT = ETIME(TARRAY) }, (not recommended).
2472
+ @end multitable
2473
+
2474
+ @item @emph {Arguments }:
2475
+ @multitable @columnfractions .15 .80
2476
+ @item @var {TARRAY }@tab The type shall be @code {REAL , DIMENSION(2) }.
2477
+ @item @var {RESULT }@tab The type shall be @code {REAL }.
2478
+ @end multitable
2479
+
2480
+ @item @emph {Return value }:
2481
+ Elapsed time in seconds since the start of program execution.
2482
+
2483
+ @item @emph {Example }:
2484
+ @smallexample
2485
+ program test_etime
2486
+ integer(8) :: i, j
2487
+ real, dimension(2) :: tarray
2488
+ real :: result
2489
+ call ETIME(tarray, result)
2490
+ print *, result
2491
+ print *, tarray(1)
2492
+ print *, tarray(2)
2493
+ do i=1,100000000 ! Just a delay
2494
+ j = i * i - i
2495
+ end do
2496
+ call ETIME(tarray, result)
2497
+ print *, result
2498
+ print *, tarray(1)
2499
+ print *, tarray(2)
2500
+ end program test_etime
2501
+ @end smallexample
2502
+ @end table
2503
+
2504
+
2505
+
2506
+ @node EXIT
2507
+ @section @code {EXIT } --- Exit the program with status.
2508
+ @findex @code {EXIT }
2509
+ @cindex exit
2510
+
2511
+ @table @asis
2512
+ @item @emph {Description }:
2513
+ @code {EXIT } causes immediate termination of the program with status. If status
2514
+ is omitted it returns the connonical @emph {success } for the system. All Fortran
2515
+ I/O units are closed.
2516
+
2517
+ @item @emph {Option }:
2518
+ gnu
2519
+
2520
+ @item @emph {Class }:
2521
+ non-elemental subroutine
2522
+
2523
+ @item @emph {Syntax }:
2524
+ @code {CALL EXIT([STATUS]) }
2525
+
2526
+ @item @emph {Arguments }:
2527
+ @multitable @columnfractions .15 .80
2528
+ @item @var {STATUS } @tab The type of the argument shall be @code {INTEGER(*) }.
2529
+ @end multitable
2530
+
2531
+ @item @emph {Return value }:
2532
+ @code {STATUS } is passed to the parent process on exit.
2533
+
2534
+ @item @emph {Example }:
2535
+ @smallexample
2536
+ program test_exit
2537
+ integer :: STATUS = 0
2538
+ print *, 'This program is going to exit.'
2539
+ call EXIT(STATUS)
2540
+ end program test_exit
2541
+ @end smallexample
2542
+ @end table
2543
+
2544
+
2545
+
2320
2546
@node EXP
2321
2547
@section @code {EXP } --- Exponential function
2322
2548
@findex @code {EXP } intrinsic
@@ -2709,13 +2935,6 @@ end program test_tanh
2709
2935
2710
2936
2711
2937
2712
- @comment gen eoshift
2713
- @comment
2714
- @comment gen epsilon
2715
- @comment
2716
- @comment gen etime
2717
- @comment sub etime
2718
- @comment
2719
2938
@comment sub exit
2720
2939
@comment
2721
2940
@comment gen exponent
0 commit comments