]> gcc.gnu.org Git - gcc.git/blob - gcc/fortran/intrinsic.texi
re PR fortran/20059 (internal compiler error: Segmentation Fault - For common blocks)
[gcc.git] / gcc / fortran / intrinsic.texi
1 @ignore
2 Copyright (C) 2005
3 Free Software Foundation, Inc.
4 This is part of the GFORTRAN manual.
5 For copying conditions, see the file gfortran.texi.
6
7 Permission is granted to copy, distribute and/or modify this document
8 under the terms of the GNU Free Documentation License, Version 1.2 or
9 any later version published by the Free Software Foundation; with the
10 Invariant Sections being ``GNU General Public License'' and ``Funding
11 Free Software'', the Front-Cover texts being (a) (see below), and with
12 the Back-Cover Texts being (b) (see below). A copy of the license is
13 included in the gfdl(7) man page.
14
15
16 Some basic guidelines for editing this document:
17
18 (1) The intrinsic procedures are to be listed in alphabetical order.
19 (2) The generic name is to be use.
20 (3) The specific names are included in the function index and in a
21 table at the end of the node (See ABS entry).
22 (4) Try to maintain the same style for each entry.
23
24
25 @end ignore
26
27 @node Intrinsic Procedures
28 @chapter Intrinsic Procedures
29 @cindex Intrinsic Procedures
30
31 This portion of the document is incomplete and undergoing massive expansion
32 and editing. All contributions and corrections are strongly encouraged.
33
34 @menu
35 * Introduction: Introduction
36 * @code{ABORT}: ABORT, Abort the program
37 * @code{ABS}: ABS, Absolute value
38 * @code{ACHAR}: ACHAR, Character in @acronym{ASCII} collating sequence
39 * @code{ACOS}: ACOS, Arccosine function
40 * @code{ADJUSTL}: ADJUSTL, Left adjust a string
41 * @code{ADJUSTR}: ADJUSTR, Right adjust a string
42 * @code{AIMAG}: AIMAG, Imaginary part of complex number
43 * @code{AINT}: AINT, Truncate to a whole number
44 * @code{ALL}: ALL, Determine if all values are true
45 * @code{ALLOCATED}: ALLOCATED, Status of allocatable entity
46 * @code{ANINT}: ANINT, Nearest whole number
47 * @code{ANY}: ANY, Determine if any values are true
48 * @code{ASIN}: ASIN, Arcsine function
49 * @code{ATAN}: ATAN, Arctangent function
50 * @code{BESJ0}: BESJ0, Bessel function of the first kind of order 0
51 * @code{BESJ1}: BESJ1, Bessel function of the first kind of order 1
52 * @code{BESJN}: BESJN, Bessel function of the first kind
53 * @code{BESY0}: BESY0, Bessel function of the second kind of order 0
54 * @code{BESY1}: BESY1, Bessel function of the second kind of order 1
55 * @code{BESYN}: BESYN, Bessel function of the second kind
56 * @code{COS}: COS, Cosine function
57 * @code{COSH}: COSH, Hyperbolic cosine function
58 * @code{ERF}: ERF, Error function
59 * @code{ERFC}: ERFC, Complementary error function
60 * @code{EXP}: EXP, Cosine function
61 * @code{LOG}: LOG, Logarithm function
62 * @code{LOG10}: LOG10, Base 10 logarithm function
63 * @code{SQRT}: SQRT, Square-root function
64 * @code{SIN}: SIN, Sine function
65 * @code{SINH}: SINH, Hyperbolic sine function
66 * @code{TAN}: TAN, Tangent function
67 * @code{TANH}: TANH, Hyperbolic tangent function
68 @end menu
69
70 @node Introduction
71 @section Introduction to intrinsic procedures
72
73 Gfortran provides a rich set of intrinsic procedures that includes all
74 the intrinsic procedures required by the Fortran 95 standard, a set of
75 intrinsic procedures for backwards compatibility with Gnu Fortran 77
76 (i.e., @command{g77}), and a small selection of intrinsic procedures
77 from the Fortran 2003 standard. Any description here, which conflicts with a
78 description in either the Fortran 95 standard or the Fortran 2003 standard,
79 is unintentional and the standard(s) should be considered authoritative.
80
81 The enumeration of the @code{KIND} type parameter is processor defined in
82 the Fortran 95 standard. Gfortran defines the default integer type and
83 default real type by @code{INTEGER(KIND=4)} and @code{REAL(KIND=4)},
84 respectively. The standard mandates that both data types shall have
85 another kind, which have more precision. On typical target architectures
86 supports by @command{gfortran}, this kind type parameter is @code{KIND=8}.
87 Hence, @code{REAL(KIND=8)} and @code{DOUBLE PRECISION} are equivalent.
88 In the description of generic intrinsic procedures, the kind type parameter
89 will be specified by @code{KIND=*}, and in the description of specific
90 names for an intrinsic procedure the kind type parameter will be explicitly
91 given (e.g., @code{REAL(KIND=4)} or @code{REAL(KIND=8)}). Finally, for
92 brevity the optional @code{KIND=} syntax will be omitted.
93
94 Many of the intrinsics procedures take one or more optional arguments.
95 This document follows the convention used in the Fortran 95 standard,
96 and denotes such arguments by square brackets.
97
98 @command{Gfortran} offers the @option{-std=f95} and @option{-std=gnu} options,
99 which can be used to restrict the set of intrinsic procedures to a
100 given standard. By default, @command{gfortran} sets the @option{-std=gnu}
101 option, and so all intrinsic procedures describe here are accepted. There
102 is one caveat. For a select group of intrinsic procedures, @command{g77}
103 implemented both a function and a subroutine. Both classes
104 have been implemented in @command{gfortran} for backwards compatibility
105 with @command{g77}. It is noted here that these functions and subroutines
106 cannot be intermixed in a given subprogram. In the descriptions that follow,
107 the applicable option(s) is noted.
108
109
110
111 @node ABORT
112 @section @code{ABORT} --- Abort the program
113 @findex @code{ABORT}
114 @cindex abort
115
116 @table @asis
117 @item @emph{Description}:
118 @code{ABORT} causes immediate termination of the program. On operating
119 systems that support a core dump, @code{ABORT} will produce a core dump,
120 which is suitable for debugging purposes.
121
122 @item @emph{Option}:
123 gnu
124
125 @item @emph{Type}:
126 non-elemental subroutine
127
128 @item @emph{Syntax}:
129 @code{CALL ABORT}
130
131 @item @emph{Return value}:
132 Does not return.
133
134 @item @emph{Example}:
135 @smallexample
136 program test_abort
137 integer :: i = 1, j = 2
138 if (i /= j) call abort
139 end program test_abort
140 @end smallexample
141 @end table
142
143
144
145 @node ABS
146 @section @code{ABS} --- Absolute value
147 @findex @code{ABS} intrinsic
148 @findex @code{CABS} intrinsic
149 @findex @code{DABS} intrinsic
150 @findex @code{IABS} intrinsic
151 @findex @code{ZABS} intrinsic
152 @findex @code{CDABS} intrinsic
153 @cindex absolute value
154
155 @table @asis
156 @item @emph{Description}:
157 @code{ABS(X)} computes the absolute value of @code{X}.
158
159 @item @emph{Option}:
160 f95, gnu
161
162 @item @emph{Type}:
163 elemental function
164
165 @item @emph{Syntax}:
166 @code{X = ABS(X)}
167
168 @item @emph{Arguments}:
169 @multitable @columnfractions .15 .80
170 @item @var{X} @tab The type of the argument shall be an @code{INTEGER(*)},
171 @code{REAL(*)}, or @code{COMPLEX(*)}.
172 @end multitable
173
174 @item @emph{Return value}:
175 The return value is of the same type and
176 kind as the argument except the return value is @code{REAL(*)} for a
177 @code{COMPLEX(*)} argument.
178
179 @item @emph{Example}:
180 @smallexample
181 program test_abs
182 integer :: i = -1
183 real :: x = -1.e0
184 complex :: z = (-1.e0,0.e0)
185 i = abs(i)
186 x = abs(x)
187 x = abs(z)
188 end program test_abs
189 @end smallexample
190
191 @item @emph{Specific names}:
192 @multitable @columnfractions .24 .24 .24 .24
193 @item Name @tab Argument @tab Return type @tab Option
194 @item @code{CABS(Z)} @tab @code{COMPLEX(4) Z} @tab @code{REAL(4)} @tab f95, gnu
195 @item @code{DABS(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
196 @item @code{IABS(I)} @tab @code{INTEGER(4) I} @tab @code{INTEGER(4)} @tab f95, gnu
197 @item @code{ZABS(Z)} @tab @code{COMPLEX(8) Z} @tab @code{COMPLEX(8)} @tab gnu
198 @item @code{CDABS(Z)} @tab @code{COMPLEX(8) Z} @tab @code{COMPLEX(8)} @tab gnu
199 @end multitable
200 @end table
201
202
203
204 @node ACHAR
205 @section @code{ACHAR} --- Character in @acronym{ASCII} collating sequence
206 @findex @code{ACHAR} intrinsic
207 @cindex @acronym{ASCII} collating sequence
208
209 @table @asis
210 @item @emph{Description}:
211 @code{ACHAR(I)} returns the character located at position @code{I}
212 in the @acronym{ASCII} collating sequence.
213
214 @item @emph{Option}:
215 f95, gnu
216
217 @item @emph{Type}:
218 elemental function
219
220 @item @emph{Syntax}:
221 @code{C = ACHAR(I)}
222
223 @item @emph{Arguments}:
224 @multitable @columnfractions .15 .80
225 @item @var{I} @tab The type shall be an @code{INTEGER(*)}.
226 @end multitable
227
228 @item @emph{Return value}:
229 The return value is of type @code{CHARACTER} with a length of one. The
230 kind type parameter is the same as @code{KIND('A')}.
231
232 @item @emph{Example}:
233 @smallexample
234 program test_achar
235 character c
236 c = achar(32)
237 end program test_achar
238 @end smallexample
239 @end table
240
241
242
243 @node ACOS
244 @section @code{ACOS} --- Arccosine function
245 @findex @code{ACOS} intrinsic
246 @findex @code{DACOS} intrinsic
247 @cindex arccosine
248
249 @table @asis
250 @item @emph{Description}:
251 @code{ACOS(X)} computes the arccosine of its @var{X}.
252
253 @item @emph{Option}:
254 f95, gnu
255
256 @item @emph{Type}:
257 elemental function
258
259 @item @emph{Syntax}:
260 @code{X = ACOS(X)}
261
262 @item @emph{Arguments}:
263 @multitable @columnfractions .15 .80
264 @item @var{X} @tab The type shall be an @code{REAL(*)}, and a magnitude that is
265 less than one.
266 @end multitable
267
268 @item @emph{Return value}:
269 The return value is of type @code{REAL(*)} and it lies in the
270 range @math{ 0 \leq \arccos (x) \leq \pi}. The kind type
271 parameter is the same as @var{X}.
272
273 @item @emph{Example}:
274 @smallexample
275 program test_acos
276 real(8) :: x = 0.866_8
277 x = achar(x)
278 end program test_acos
279 @end smallexample
280
281 @item @emph{Specific names}:
282 @multitable @columnfractions .24 .24 .24 .24
283 @item Name @tab Argument @tab Return type @tab Option
284 @item @code{DACOS(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
285 @end multitable
286 @end table
287
288
289
290 @node ADJUSTL
291 @section @code{ADJUSTL} --- Left adjust a string
292 @findex @code{ADJUSTL} intrinsic
293 @cindex adjust string
294
295 @table @asis
296 @item @emph{Description}:
297 @code{ADJUSTL(STR)} will left adjust a string by removing leading spaces.
298 Spaces are inserted at the end of the string as needed.
299
300 @item @emph{Option}:
301 f95, gnu
302
303 @item @emph{Type}:
304 elemental function
305
306 @item @emph{Syntax}:
307 @code{STR = ADJUSTL(STR)}
308
309 @item @emph{Arguments}:
310 @multitable @columnfractions .15 .80
311 @item @var{STR} @tab The type shall be @code{CHARACTER}.
312 @end multitable
313
314 @item @emph{Return value}:
315 The return value is of type @code{CHARACTER} where leading spaces
316 are removed and the same number of spaces are inserted on the end
317 of @var{STR}.
318
319 @item @emph{Example}:
320 @smallexample
321 program test_adjustl
322 character(len=20) :: str = ' gfortran'
323 str = adjustl(str)
324 print *, str
325 end program test_adjustl
326 @end smallexample
327 @end table
328
329
330 @node ADJUSTR
331 @section @code{ADJUSTR} --- Right adjust a string
332 @findex @code{ADJUSTR} intrinsic
333 @cindex adjust string
334
335 @table @asis
336 @item @emph{Description}:
337 @code{ADJUSTR(STR)} will right adjust a string by removing trailing spaces.
338 Spaces are inserted at the start of the string as needed.
339
340 @item @emph{Option}:
341 f95, gnu
342
343 @item @emph{Type}:
344 elemental function
345
346 @item @emph{Syntax}:
347 @code{STR = ADJUSTR(STR)}
348
349 @item @emph{Arguments}:
350 @multitable @columnfractions .15 .80
351 @item @var{STR} @tab The type shall be @code{CHARACTER}.
352 @end multitable
353
354 @item @emph{Return value}:
355 The return value is of type @code{CHARACTER} where trailing spaces
356 are removed and the same number of spaces are inserted at the start
357 of @var{STR}.
358
359 @item @emph{Example}:
360 @smallexample
361 program test_adjustr
362 character(len=20) :: str = 'gfortran'
363 str = adjustr(str)
364 print *, str
365 end program test_adjustr
366 @end smallexample
367 @end table
368
369
370 @node AIMAG
371 @section @code{AIMAG} --- Imaginary part of complex number
372 @findex @code{AIMAG} intrinsic
373 @findex @code{DIMAG} intrinsic
374 @cindex Imaginary part
375
376 @table @asis
377 @item @emph{Description}:
378 @code{AIMAG(Z)} yields the imaginary part of complex argument @code{Z}.
379
380 @item @emph{Option}:
381 f95, gnu
382
383 @item @emph{Type}:
384 elemental function
385
386 @item @emph{Syntax}:
387 @code{X = AIMAG(Z)}
388
389 @item @emph{Arguments}:
390 @multitable @columnfractions .15 .80
391 @item @var{Z} @tab The type of the argument shall be @code{COMPLEX(*)}.
392 @end multitable
393
394 @item @emph{Return value}:
395 The return value is of type real with the
396 kind type parameter of the argument.
397
398 @item @emph{Example}:
399 @smallexample
400 program test_aimag
401 complex(4) z4
402 complex(8) z8
403 z4 = cmplx(1.e0_4, 0.e0_4)
404 z8 = cmplx(0.e0_8, 1.e0_8)
405 print *, aimag(z4), dimag(z8)
406 end program test_aimag
407 @end smallexample
408
409 @item @emph{Specific names}:
410 @multitable @columnfractions .24 .24 .24 .24
411 @item Name @tab Argument @tab Return type @tab Option
412 @item @code{DIMAG(Z)} @tab @code{COMPLEX(8) Z} @tab @code{REAL(8)} @tab f95, gnu
413 @end multitable
414 @end table
415
416
417 @node AINT
418 @section @code{AINT} --- Imaginary part of complex number
419 @findex @code{AINT} intrinsic
420 @findex @code{DINT} intrinsic
421 @cindex whole number
422
423 @table @asis
424 @item @emph{Description}:
425 @code{AINT(X [, KIND])} truncates its argument to a whole number.
426
427 @item @emph{Option}:
428 f95, gnu
429
430 @item @emph{Type}:
431 elemental function
432
433 @item @emph{Syntax}:
434 @code{X = AINT(X)} @*
435 @code{X = AINT(X, KIND)}
436
437 @item @emph{Arguments}:
438 @multitable @columnfractions .15 .80
439 @item @var{X} @tab The type of the argument shall be @code{REAL(*)}.
440 @item @var{KIND} @tab (Optional) @var{KIND} shall be a scalar integer
441 initialization expression.
442 @end multitable
443
444 @item @emph{Return value}:
445 The return value is of type real with the kind type parameter of the
446 argument if the optional @var{KIND} is absence; otherwise, the kind
447 type parameter will be given by @var{KIND}. If the magnitude of
448 @var{X} is less than one, then @code{AINT(X)} returns zero. If the
449 magnitude is equal to or greater than one, then it returns the largest
450 whole number that does not exceed its magnitude. The sign is the same
451 as the sign of @var{X}.
452
453 @item @emph{Example}:
454 @smallexample
455 program test_aint
456 real(4) x4
457 real(8) x8
458 x4 = 1.234E0_4
459 x8 = 4.321_8
460 print *, aint(x4), dint(x8)
461 x8 = aint(x4,8)
462 end program test_aint
463 @end smallexample
464
465 @item @emph{Specific names}:
466 @multitable @columnfractions .24 .24 .24 .24
467 @item Name @tab Argument @tab Return type @tab Option
468 @item @code{DINT(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
469 @end multitable
470 @end table
471
472
473 @node ALL
474 @section @code{ALL} --- All values in @var{MASK} along @var{DIM} are true
475 @findex @code{ALL} intrinsic
476 @cindex true values
477
478 @table @asis
479 @item @emph{Description}:
480 @code{ALL(MASK [, DIM])} determines if all the values are true in @var{MASK}
481 in the array along dimension @var{DIM}.
482
483 @item @emph{Option}:
484 f95, gnu
485
486 @item @emph{Type}:
487 transformational function
488
489 @item @emph{Syntax}:
490 @code{L = ALL(MASK)} @*
491 @code{L = ALL(MASK, DIM)}
492
493 @item @emph{Arguments}:
494 @multitable @columnfractions .15 .80
495 @item @var{MASK} @tab The type of the argument shall be @code{LOGICAL(*)} and
496 it shall not be scalar.
497 @item @var{DIM} @tab (Optional) @var{DIM} shall be a scalar integer
498 with a value that lies between one and the rank of @var{MASK}.
499 @end multitable
500
501 @item @emph{Return value}:
502 @code{ALL(MASK)} returns a scalar value of type @code{LOGICAL(*)} where
503 the kind type parameter is the same as the kind type parameter of
504 @var{MASK}. If @var{DIM} is present, then @code{ALL(MASK, DIM)} returns
505 an array with the rank of @var{MASK} minus 1. The shape is determined from
506 the shape of @var{MASK} where the @var{DIM} dimension is elided.
507
508 @table @asis
509 @item (A)
510 @code{ALL(MASK)} is true if all elements of @var{MASK} are true.
511 It also is true if @var{MASK} has zero size; otherwise, it is false.
512 @item (B)
513 If the rank of @var{MASK} is one, then @code{ALL(MASK,DIM)} is equivalent
514 to @code{ALL(MASK)}. If the rank is greater than one, then @code{ALL(MASK,DIM)}
515 is determined by applying @code{ALL} to the array sections.
516 @end table
517
518 @item @emph{Example}:
519 @smallexample
520 program test_all
521 logical l
522 l = all((/.true., .true., .true./))
523 print *, l
524 call section
525 contains
526 subroutine section
527 integer a(2,3), b(2,3)
528 a = 1
529 b = 1
530 b(2,2) = 2
531 print *, all(a .eq. b, 1)
532 print *, all(a .eq. b, 2)
533 end subroutine section
534 end program test_all
535 @end smallexample
536 @end table
537
538
539 @node ALLOCATED
540 @section @code{ALLOCATED} --- Status of an allocatable entity
541 @findex @code{ALLOCATED} intrinsic
542 @cindex allocation status
543
544 @table @asis
545 @item @emph{Description}:
546 @code{ALLOCATED(X)} checks the status of wether @var{X} is allocated.
547
548 @item @emph{Option}:
549 f95, gnu
550
551 @item @emph{Type}:
552 inquiry function
553
554 @item @emph{Syntax}:
555 @code{L = ALLOCATED(X)}
556
557 @item @emph{Arguments}:
558 @multitable @columnfractions .15 .80
559 @item @var{X} @tab The argument shall be an @code{ALLOCATABLE} array.
560 @end multitable
561
562 @item @emph{Return value}:
563 The return value is a scalar @code{LOGICAL} with the default logical
564 kind type parameter. If @var{X} is allocated, @code{ALLOCATED(X)}
565 is @code{.TRUE.}; otherwise, it returns the @code{.TRUE.}
566
567 @item @emph{Example}:
568 @smallexample
569 program test_allocated
570 integer :: i = 4
571 real(4), allocatable :: x(:)
572 if (allocated(x) .eqv. .false.) allocate(x(i)
573 end program test_allocated
574 @end smallexample
575 @end table
576
577
578 @node ANINT
579 @section @code{ANINT} --- Imaginary part of complex number
580 @findex @code{ANINT} intrinsic
581 @findex @code{DNINT} intrinsic
582 @cindex whole number
583
584 @table @asis
585 @item @emph{Description}:
586 @code{ANINT(X [, KIND])} rounds its argument to the nearest whole number.
587
588 @item @emph{Option}:
589 f95, gnu
590
591 @item @emph{Type}:
592 elemental function
593
594 @item @emph{Syntax}:
595 @code{X = ANINT(X)} @*
596 @code{X = ANINT(X, KIND)}
597
598 @item @emph{Arguments}:
599 @multitable @columnfractions .15 .80
600 @item @var{X} @tab The type of the argument shall be @code{REAL(*)}.
601 @item @var{KIND} @tab (Optional) @var{KIND} shall be a scalar integer
602 initialization expression.
603 @end multitable
604
605 @item @emph{Return value}:
606 The return value is of type real with the kind type parameter of the
607 argument if the optional @var{KIND} is absence; otherwise, the kind
608 type parameter will be given by @var{KIND}. If @var{X} is greater than
609 zero, then @code{ANINT(X)} returns @code{AINT(X+0.5)}. If @var{X} is
610 less than or equal to zero, then return @code{AINT(X-0.5)}.
611
612 @item @emph{Example}:
613 @smallexample
614 program test_anint
615 real(4) x4
616 real(8) x8
617 x4 = 1.234E0_4
618 x8 = 4.321_8
619 print *, anint(x4), dnint(x8)
620 x8 = anint(x4,8)
621 end program test_anint
622 @end smallexample
623
624 @item @emph{Specific names}:
625 @multitable @columnfractions .24 .24 .24 .24
626 @item Name @tab Argument @tab Return type @tab Option
627 @item @code{DNINT(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
628 @end multitable
629 @end table
630
631
632 @node ANY
633 @section @code{ANY} --- Any value in @var{MASK} along @var{DIM} is true
634 @findex @code{ANY} intrinsic
635 @cindex true values
636
637 @table @asis
638 @item @emph{Description}:
639 @code{ANY(MASK [, DIM])} determines if any of the values is true in @var{MASK}
640 in the array along dimension @var{DIM}.
641
642 @item @emph{Option}:
643 f95, gnu
644
645 @item @emph{Type}:
646 transformational function
647
648 @item @emph{Syntax}:
649 @code{L = ANY(MASK)} @*
650 @code{L = ANY(MASK, DIM)}
651
652 @item @emph{Arguments}:
653 @multitable @columnfractions .15 .80
654 @item @var{MASK} @tab The type of the argument shall be @code{LOGICAL(*)} and
655 it shall not be scalar.
656 @item @var{DIM} @tab (Optional) @var{DIM} shall be a scalar integer
657 with a value that lies between one and the rank of @var{MASK}.
658 @end multitable
659
660 @item @emph{Return value}:
661 @code{ANY(MASK)} returns a scalar value of type @code{LOGICAL(*)} where
662 the kind type parameter is the same as the kind type parameter of
663 @var{MASK}. If @var{DIM} is present, then @code{ANY(MASK, DIM)} returns
664 an array with the rank of @var{MASK} minus 1. The shape is determined from
665 the shape of @var{MASK} where the @var{DIM} dimension is elided.
666
667 @table @asis
668 @item (A)
669 @code{ANY(MASK)} is true if any element of @var{MASK} is true;
670 otherwise, it is false. It also is false if @var{MASK} has zero size.
671 @item (B)
672 If the rank of @var{MASK} is one, then @code{ANY(MASK,DIM)} is equivalent
673 to @code{ANY(MASK)}. If the rank is greater than one, then @code{ANY(MASK,DIM)}
674 is determined by applying @code{ANY} to the array sections.
675 @end table
676
677 @item @emph{Example}:
678 @smallexample
679 program test_any
680 logical l
681 l = any((/.true., .true., .true./))
682 print *, l
683 call section
684 contains
685 subroutine section
686 integer a(2,3), b(2,3)
687 a = 1
688 b = 1
689 b(2,2) = 2
690 print *, any(a .eq. b, 1)
691 print *, any(a .eq. b, 2)
692 end subroutine section
693 end program test_any
694 @end smallexample
695 @end table
696
697
698 @node ASIN
699 @section @code{ASIN} --- Arcsine function
700 @findex @code{ASIN} intrinsic
701 @findex @code{DASIN} intrinsic
702 @cindex arcsine
703
704 @table @asis
705 @item @emph{Description}:
706 @code{ASIN(X)} computes the arcsine of its @var{X}.
707
708 @item @emph{Option}:
709 f95, gnu
710
711 @item @emph{Type}:
712 elemental function
713
714 @item @emph{Syntax}:
715 @code{X = ASIN(X)}
716
717 @item @emph{Arguments}:
718 @multitable @columnfractions .15 .80
719 @item @var{X} @tab The type shall be an @code{REAL(*)}, and a magnitude that is
720 less than one.
721 @end multitable
722
723 @item @emph{Return value}:
724 The return value is of type @code{REAL(*)} and it lies in the
725 range @math{ \pi / 2 \leq \arccos (x) \leq \pi / 2}. The kind type
726 parameter is the same as @var{X}.
727
728 @item @emph{Example}:
729 @smallexample
730 program test_asin
731 real(8) :: x = 0.866_8
732 x = asin(x)
733 end program test_asin
734 @end smallexample
735
736 @item @emph{Specific names}:
737 @multitable @columnfractions .24 .24 .24 .24
738 @item Name @tab Argument @tab Return type @tab Option
739 @item @code{DASIN(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
740 @end multitable
741 @end table
742
743
744 @node ATAN
745 @section @code{ATAN} --- Arctangent function
746 @findex @code{ATAN} intrinsic
747 @findex @code{DATAN} intrinsic
748 @cindex arctangent
749
750 @table @asis
751 @item @emph{Description}:
752 @code{ATAN(X)} computes the arctangent of @var{X}.
753
754 @item @emph{Option}:
755 f95, gnu
756
757 @item @emph{Type}:
758 elemental function
759
760 @item @emph{Syntax}:
761 @code{X = ATAN(X)}
762
763 @item @emph{Arguments}:
764 @multitable @columnfractions .15 .80
765 @item @var{X} @tab The type shall be an @code{REAL(*)}.
766 @end multitable
767
768 @item @emph{Return value}:
769 The return value is of type @code{REAL(*)} and it lies in the
770 range @math{ - \pi / 2 \leq \arcsin (x) \leq \pi / 2}.
771
772 @item @emph{Example}:
773 @smallexample
774 program test_atan
775 real(8) :: x = 2.866_8
776 x = atan(x)
777 end program test_atan
778 @end smallexample
779
780 @item @emph{Specific names}:
781 @multitable @columnfractions .24 .24 .24 .24
782 @item Name @tab Argument @tab Return type @tab Option
783 @item @code{DATAN(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
784 @end multitable
785 @end table
786
787
788
789 @node BESJ0
790 @section @code{BESJ0} --- Bessel function of the first kind of order 0
791 @findex @code{BESJ0} intrinsic
792 @findex @code{DBESJ0} intrinsic
793 @cindex Bessel
794
795 @table @asis
796 @item @emph{Description}:
797 @code{BESJ0(X)} computes the Bessel function of the first kind of order 0
798 of @var{X}.
799
800 @item @emph{Option}:
801 gnu
802
803 @item @emph{Type}:
804 elemental function
805
806 @item @emph{Syntax}:
807 @code{X = BESJ0(X)}
808
809 @item @emph{Arguments}:
810 @multitable @columnfractions .15 .80
811 @item @var{X} @tab The type shall be an @code{REAL(*)}.
812 @end multitable
813
814 @item @emph{Return value}:
815 The return value is of type @code{REAL(*)} and it lies in the
816 range @math{ - 0.4027... \leq Bessel (0,x) \leq 1}.
817
818 @item @emph{Example}:
819 @smallexample
820 program test_besj0
821 real(8) :: x = 0.0_8
822 x = besj0(x)
823 end program test_besj0
824 @end smallexample
825
826 @item @emph{Specific names}:
827 @multitable @columnfractions .24 .24 .24 .24
828 @item Name @tab Argument @tab Return type @tab Option
829 @item @code{DBESJ0(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab gnu
830 @end multitable
831 @end table
832
833
834
835 @node BESJ1
836 @section @code{BESJ1} --- Bessel function of the first kind of order 1
837 @findex @code{BESJ1} intrinsic
838 @findex @code{DBESJ1} intrinsic
839 @cindex Bessel
840
841 @table @asis
842 @item @emph{Description}:
843 @code{BESJ1(X)} computes the Bessel function of the first kind of order 1
844 of @var{X}.
845
846 @item @emph{Option}:
847 gnu
848
849 @item @emph{Type}:
850 elemental function
851
852 @item @emph{Syntax}:
853 @code{X = BESJ1(X)}
854
855 @item @emph{Arguments}:
856 @multitable @columnfractions .15 .80
857 @item @var{X} @tab The type shall be an @code{REAL(*)}.
858 @end multitable
859
860 @item @emph{Return value}:
861 The return value is of type @code{REAL(*)} and it lies in the
862 range @math{ - 0.5818... \leq Bessel (0,x) \leq 0.5818 }.
863
864 @item @emph{Example}:
865 @smallexample
866 program test_besj1
867 real(8) :: x = 1.0_8
868 x = besj1(x)
869 end program test_besj1
870 @end smallexample
871
872 @item @emph{Specific names}:
873 @multitable @columnfractions .24 .24 .24 .24
874 @item Name @tab Argument @tab Return type @tab Option
875 @item @code{DBESJ1(X)}@tab @code{REAL(8) X} @tab @code{REAL(8)} @tab gnu
876 @end multitable
877 @end table
878
879
880
881 @node BESJN
882 @section @code{BESJN} --- Bessel function of the first kind
883 @findex @code{BESJN} intrinsic
884 @findex @code{DBESJN} intrinsic
885 @cindex Bessel
886
887 @table @asis
888 @item @emph{Description}:
889 @code{BESJN(N, X)} computes the Bessel function of the first kind of order
890 @var{N} of @var{X}.
891
892 @item @emph{Option}:
893 gnu
894
895 @item @emph{Type}:
896 elemental function
897
898 @item @emph{Syntax}:
899 @code{Y = BESJN(N, X)}
900
901 @item @emph{Arguments}:
902 @multitable @columnfractions .15 .80
903 @item @var{N} @tab The type shall be an @code{INTEGER(*)}.
904 @item @var{X} @tab The type shall be an @code{REAL(*)}.
905 @end multitable
906
907 @item @emph{Return value}:
908 The return value is of type @code{REAL(*)}.
909
910 @item @emph{Example}:
911 @smallexample
912 program test_besjn
913 real(8) :: x = 1.0_8
914 x = besjn(5,x)
915 end program test_besjn
916 @end smallexample
917
918 @item @emph{Specific names}:
919 @multitable @columnfractions .24 .24 .24 .24
920 @item Name @tab Argument @tab Return type @tab Option
921 @item @code{DBESJN(X)}@tab @code{REAL(8) X} @tab @code{REAL(8)} @tab gnu
922 @end multitable
923 @end table
924
925
926
927 @node BESY0
928 @section @code{BESY0} --- Bessel function of the second kind of order 0
929 @findex @code{BESY0} intrinsic
930 @findex @code{DBESY0} intrinsic
931 @cindex Bessel
932
933 @table @asis
934 @item @emph{Description}:
935 @code{BESY0(X)} computes the Bessel function of the second kind of order 0
936 of @var{X}.
937
938 @item @emph{Option}:
939 gnu
940
941 @item @emph{Type}:
942 elemental function
943
944 @item @emph{Syntax}:
945 @code{X = BESY0(X)}
946
947 @item @emph{Arguments}:
948 @multitable @columnfractions .15 .80
949 @item @var{X} @tab The type shall be an @code{REAL(*)}.
950 @end multitable
951
952 @item @emph{Return value}:
953 The return value is of type @code{REAL(*)}.
954
955 @item @emph{Example}:
956 @smallexample
957 program test_besy0
958 real(8) :: x = 0.0_8
959 x = besy0(x)
960 end program test_besy0
961 @end smallexample
962
963 @item @emph{Specific names}:
964 @multitable @columnfractions .24 .24 .24 .24
965 @item Name @tab Argument @tab Return type @tab Option
966 @item @code{DBESY0(X)}@tab @code{REAL(8) X} @tab @code{REAL(8)} @tab gnu
967 @end multitable
968 @end table
969
970
971
972 @node BESY1
973 @section @code{BESY1} --- Bessel function of the second kind of order 1
974 @findex @code{BESY1} intrinsic
975 @findex @code{DBESY1} intrinsic
976 @cindex Bessel
977
978 @table @asis
979 @item @emph{Description}:
980 @code{BESY1(X)} computes the Bessel function of the second kind of order 1
981 of @var{X}.
982
983 @item @emph{Option}:
984 gnu
985
986 @item @emph{Type}:
987 elemental function
988
989 @item @emph{Syntax}:
990 @code{X = BESY1(X)}
991
992 @item @emph{Arguments}:
993 @multitable @columnfractions .15 .80
994 @item @var{X} @tab The type shall be an @code{REAL(*)}.
995 @end multitable
996
997 @item @emph{Return value}:
998 The return value is of type @code{REAL(*)}.
999
1000 @item @emph{Example}:
1001 @smallexample
1002 program test_besy1
1003 real(8) :: x = 1.0_8
1004 x = besy1(x)
1005 end program test_besy1
1006 @end smallexample
1007
1008 @item @emph{Specific names}:
1009 @multitable @columnfractions .24 .24 .24 .24
1010 @item Name @tab Argument @tab Return type @tab Option
1011 @item @code{DBESY1(X)}@tab @code{REAL(8) X} @tab @code{REAL(8)} @tab gnu
1012 @end multitable
1013 @end table
1014
1015
1016
1017 @node BESYN
1018 @section @code{BESYN} --- Bessel function of the second kind
1019 @findex @code{BESYN} intrinsic
1020 @findex @code{DBESYN} intrinsic
1021 @cindex Bessel
1022
1023 @table @asis
1024 @item @emph{Description}:
1025 @code{BESYN(N, X)} computes the Bessel function of the second kind of order
1026 @var{N} of @var{X}.
1027
1028 @item @emph{Option}:
1029 gnu
1030
1031 @item @emph{Type}:
1032 elemental function
1033
1034 @item @emph{Syntax}:
1035 @code{Y = BESYN(N, X)}
1036
1037 @item @emph{Arguments}:
1038 @multitable @columnfractions .15 .80
1039 @item @var{N} @tab The type shall be an @code{INTEGER(*)}.
1040 @item @var{X} @tab The type shall be an @code{REAL(*)}.
1041 @end multitable
1042
1043 @item @emph{Return value}:
1044 The return value is of type @code{REAL(*)}.
1045
1046 @item @emph{Example}:
1047 @smallexample
1048 program test_besyn
1049 real(8) :: x = 1.0_8
1050 x = besyn(5,x)
1051 end program test_besyn
1052 @end smallexample
1053
1054 @item @emph{Specific names}:
1055 @multitable @columnfractions .24 .24 .24 .24
1056 @item Name @tab Argument @tab Return type @tab Option
1057 @item @code{DBESYN(X)}@tab @code{REAL(8) X} @tab @code{REAL(8)} @tab gnu
1058 @end multitable
1059 @end table
1060
1061
1062 @node COS
1063 @section @code{COS} --- Cosine function
1064 @findex @code{COS} intrinsic
1065 @findex @code{DCOS} intrinsic
1066 @findex @code{ZCOS} intrinsic
1067 @findex @code{CDCOS} intrinsic
1068 @cindex cosine
1069
1070 @table @asis
1071 @item @emph{Description}:
1072 @code{COS(X)} computes the cosine of @var{X}.
1073
1074 @item @emph{Option}:
1075 f95, gnu
1076
1077 @item @emph{Type}:
1078 elemental function
1079
1080 @item @emph{Syntax}:
1081 @code{X = COS(X)}
1082
1083 @item @emph{Arguments}:
1084 @multitable @columnfractions .15 .80
1085 @item @var{X} @tab The type shall be an @code{REAL(*)} or
1086 @code{COMPLEX(*)}.
1087 @end multitable
1088
1089 @item @emph{Return value}:
1090 The return value has same type and kind than @var{X}.
1091
1092 @item @emph{Example}:
1093 @smallexample
1094 program test_cos
1095 real :: x = 0.0
1096 x = cos(x)
1097 end program test_cos
1098 @end smallexample
1099
1100 @item @emph{Specific names}:
1101 @multitable @columnfractions .24 .24 .24 .24
1102 @item Name @tab Argument @tab Return type @tab Option
1103 @item @code{DCOS(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
1104 @item @code{CCOS(X)} @tab @code{COMPLEX(4) X} @tab @code{COMPLEX(4)} @tab f95, gnu
1105 @item @code{ZCOS(X)} @tab @code{COMPLEX(8) X} @tab @code{COMPLEX(8)} @tab f95, gnu
1106 @item @code{CDCOS(X)} @tab @code{COMPLEX(8) X} @tab @code{COMPLEX(8)} @tab f95, gnu
1107 @end multitable
1108 @end table
1109
1110
1111 @node COSH
1112 @section @code{COSH} --- Hyperbolic cosine function
1113 @findex @code{COSH} intrinsic
1114 @findex @code{DCOSH} intrinsic
1115 @cindex hyperbolic cosine
1116
1117 @table @asis
1118 @item @emph{Description}:
1119 @code{COSH(X)} computes the hyperbolic cosine of @var{X}.
1120
1121 @item @emph{Option}:
1122 f95, gnu
1123
1124 @item @emph{Type}:
1125 elemental function
1126
1127 @item @emph{Syntax}:
1128 @code{X = COSH(X)}
1129
1130 @item @emph{Arguments}:
1131 @multitable @columnfractions .15 .80
1132 @item @var{X} @tab The type shall be an @code{REAL(*)}.
1133 @end multitable
1134
1135 @item @emph{Return value}:
1136 The return value is of type @code{REAL(*)} and it is positive
1137 (@math{ \cosh (x) \geq 0 }.
1138
1139 @item @emph{Example}:
1140 @smallexample
1141 program test_cosh
1142 real(8) :: x = 1.0_8
1143 x = cosh(x)
1144 end program test_cosh
1145 @end smallexample
1146
1147 @item @emph{Specific names}:
1148 @multitable @columnfractions .24 .24 .24 .24
1149 @item Name @tab Argument @tab Return type @tab Option
1150 @item @code{DCOSH(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
1151 @end multitable
1152 @end table
1153
1154
1155 @node ERF
1156 @section @code{ERF} --- Error function
1157 @findex @code{ERF} intrinsic
1158 @cindex error
1159
1160 @table @asis
1161 @item @emph{Description}:
1162 @code{ERF(X)} computes the error function of @var{X}.
1163
1164 @item @emph{Option}:
1165 gnu
1166
1167 @item @emph{Type}:
1168 elemental function
1169
1170 @item @emph{Syntax}:
1171 @code{X = ERF(X)}
1172
1173 @item @emph{Arguments}:
1174 @multitable @columnfractions .15 .80
1175 @item @var{X} @tab The type shall be an @code{REAL(*)}.
1176 @end multitable
1177
1178 @item @emph{Return value}:
1179 The return value is of type @code{REAL(*)} and it is positive
1180 (@math{ - 1 \leq erf (x) \leq 1 }.
1181
1182 @item @emph{Example}:
1183 @smallexample
1184 program test_erf
1185 real(8) :: x = 0.17_8
1186 x = erf(x)
1187 end program test_erf
1188 @end smallexample
1189
1190 @item @emph{Specific names}:
1191 @multitable @columnfractions .24 .24 .24 .24
1192 @item Name @tab Argument @tab Return type @tab Option
1193 @item @code{DERF(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab gnu
1194 @end multitable
1195 @end table
1196
1197
1198
1199 @node ERFC
1200 @section @code{ERFC} --- Error function
1201 @findex @code{ERFC} intrinsic
1202 @cindex error
1203
1204 @table @asis
1205 @item @emph{Description}:
1206 @code{ERFC(X)} computes the complementary error function of @var{X}.
1207
1208 @item @emph{Option}:
1209 gnu
1210
1211 @item @emph{Type}:
1212 elemental function
1213
1214 @item @emph{Syntax}:
1215 @code{X = ERFC(X)}
1216
1217 @item @emph{Arguments}:
1218 @multitable @columnfractions .15 .80
1219 @item @var{X} @tab The type shall be an @code{REAL(*)}.
1220 @end multitable
1221
1222 @item @emph{Return value}:
1223 The return value is of type @code{REAL(*)} and it is positive
1224 (@math{ 0 \leq erfc (x) \leq 2 }.
1225
1226 @item @emph{Example}:
1227 @smallexample
1228 program test_erfc
1229 real(8) :: x = 0.17_8
1230 x = erfc(x)
1231 end program test_erfc
1232 @end smallexample
1233
1234 @item @emph{Specific names}:
1235 @multitable @columnfractions .24 .24 .24 .24
1236 @item Name @tab Argument @tab Return type @tab Option
1237 @item @code{DERFC(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab gnu
1238 @end multitable
1239 @end table
1240
1241
1242
1243 @node EXP
1244 @section @code{EXP} --- Exponential function
1245 @findex @code{EXP} intrinsic
1246 @findex @code{DEXP} intrinsic
1247 @findex @code{ZEXP} intrinsic
1248 @findex @code{CDEXP} intrinsic
1249 @cindex exponential
1250
1251 @table @asis
1252 @item @emph{Description}:
1253 @code{EXP(X)} computes the base @math{e} exponential of @var{X}.
1254
1255 @item @emph{Option}:
1256 f95, gnu
1257
1258 @item @emph{Type}:
1259 elemental function
1260
1261 @item @emph{Syntax}:
1262 @code{X = EXP(X)}
1263
1264 @item @emph{Arguments}:
1265 @multitable @columnfractions .15 .80
1266 @item @var{X} @tab The type shall be an @code{REAL(*)} or
1267 @code{COMPLEX(*)}.
1268 @end multitable
1269
1270 @item @emph{Return value}:
1271 The return value has same type and kind than @var{X}.
1272
1273 @item @emph{Example}:
1274 @smallexample
1275 program test_exp
1276 real :: x = 1.0
1277 x = exp(x)
1278 end program test_exp
1279 @end smallexample
1280
1281 @item @emph{Specific names}:
1282 @multitable @columnfractions .24 .24 .24 .24
1283 @item Name @tab Argument @tab Return type @tab Option
1284 @item @code{DEXP(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
1285 @item @code{CEXP(X)} @tab @code{COMPLEX(4) X} @tab @code{COMPLEX(4)} @tab f95, gnu
1286 @item @code{ZEXP(X)} @tab @code{COMPLEX(8) X} @tab @code{COMPLEX(8)} @tab f95, gnu
1287 @item @code{CDEXP(X)} @tab @code{COMPLEX(8) X} @tab @code{COMPLEX(8)} @tab f95, gnu
1288 @end multitable
1289 @end table
1290
1291
1292 @node LOG
1293 @section @code{LOG} --- Logarithm function
1294 @findex @code{LOG} intrinsic
1295 @findex @code{ALOG} intrinsic
1296 @findex @code{DLOG} intrinsic
1297 @findex @code{CLOG} intrinsic
1298 @findex @code{ZLOG} intrinsic
1299 @findex @code{CDLOG} intrinsic
1300 @cindex logarithm
1301
1302 @table @asis
1303 @item @emph{Description}:
1304 @code{LOG(X)} computes the logarithm of @var{X}.
1305
1306 @item @emph{Option}:
1307 f95, gnu
1308
1309 @item @emph{Type}:
1310 elemental function
1311
1312 @item @emph{Syntax}:
1313 @code{X = LOG(X)}
1314
1315 @item @emph{Arguments}:
1316 @multitable @columnfractions .15 .80
1317 @item @var{X} @tab The type shall be an @code{REAL(*)} or
1318 @code{COMPLEX(*)}.
1319 @end multitable
1320
1321 @item @emph{Return value}:
1322 The return value is of type @code{REAL(*)} or @code{COMPLEX(*)}.
1323 The kind type parameter is the same as @var{X}.
1324
1325 @item @emph{Example}:
1326 @smallexample
1327 program test_log
1328 real(8) :: x = 1.0_8
1329 complex :: z = (1.0, 2.0)
1330 x = log(x)
1331 z = log(z)
1332 end program test_log
1333 @end smallexample
1334
1335 @item @emph{Specific names}:
1336 @multitable @columnfractions .24 .24 .24 .24
1337 @item Name @tab Argument @tab Return type @tab Option
1338 @item @code{ALOG(X)} @tab @code{REAL(4) X} @tab @code{REAL(4)} @tab f95, gnu
1339 @item @code{DLOG(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
1340 @item @code{CLOG(X)} @tab @code{COMPLEX(4) X} @tab @code{COMPLEX(4)} @tab f95, gnu
1341 @item @code{ZLOG(X)} @tab @code{COMPLEX(8) X} @tab @code{COMPLEX(8)} @tab f95, gnu
1342 @item @code{CDLOG(X)} @tab @code{COMPLEX(8) X} @tab @code{COMPLEX(8)} @tab f95, gnu
1343 @end multitable
1344 @end table
1345
1346
1347
1348 @node LOG10
1349 @section @code{LOG10} --- Base 10 logarithm function
1350 @findex @code{LOG10} intrinsic
1351 @findex @code{ALOG10} intrinsic
1352 @findex @code{DLOG10} intrinsic
1353 @cindex logarithm
1354
1355 @table @asis
1356 @item @emph{Description}:
1357 @code{LOG10(X)} computes the base 10 logarithm of @var{X}.
1358
1359 @item @emph{Option}:
1360 f95, gnu
1361
1362 @item @emph{Type}:
1363 elemental function
1364
1365 @item @emph{Syntax}:
1366 @code{X = LOG10(X)}
1367
1368 @item @emph{Arguments}:
1369 @multitable @columnfractions .15 .80
1370 @item @var{X} @tab The type shall be an @code{REAL(*)} or
1371 @code{COMPLEX(*)}.
1372 @end multitable
1373
1374 @item @emph{Return value}:
1375 The return value is of type @code{REAL(*)} or @code{COMPLEX(*)}.
1376 The kind type parameter is the same as @var{X}.
1377
1378 @item @emph{Example}:
1379 @smallexample
1380 program test_log10
1381 real(8) :: x = 10.0_8
1382 x = log10(x)
1383 end program test_log10
1384 @end smallexample
1385
1386 @item @emph{Specific names}:
1387 @multitable @columnfractions .24 .24 .24 .24
1388 @item Name @tab Argument @tab Return type @tab Option
1389 @item @code{ALOG10(X)} @tab @code{REAL(4) X} @tab @code{REAL(4)} @tab f95, gnu
1390 @item @code{DLOG10(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
1391 @end multitable
1392 @end table
1393
1394
1395
1396 @node SIN
1397 @section @code{SIN} --- Sine function
1398 @findex @code{SIN} intrinsic
1399 @findex @code{DSIN} intrinsic
1400 @findex @code{ZSIN} intrinsic
1401 @findex @code{CDSIN} intrinsic
1402 @cindex sine
1403
1404 @table @asis
1405 @item @emph{Description}:
1406 @code{SIN(X)} computes the sine of @var{X}.
1407
1408 @item @emph{Option}:
1409 f95, gnu
1410
1411 @item @emph{Type}:
1412 elemental function
1413
1414 @item @emph{Syntax}:
1415 @code{X = SIN(X)}
1416
1417 @item @emph{Arguments}:
1418 @multitable @columnfractions .15 .80
1419 @item @var{X} @tab The type shall be an @code{REAL(*)} or
1420 @code{COMPLEX(*)}.
1421 @end multitable
1422
1423 @item @emph{Return value}:
1424 The return value has same type and king than @var{X}.
1425
1426 @item @emph{Example}:
1427 @smallexample
1428 program test_sin
1429 real :: x = 0.0
1430 x = sin(x)
1431 end program test_sin
1432 @end smallexample
1433
1434 @item @emph{Specific names}:
1435 @multitable @columnfractions .24 .24 .24 .24
1436 @item Name @tab Argument @tab Return type @tab Option
1437 @item @code{DSIN(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
1438 @item @code{CSIN(X)} @tab @code{COMPLEX(4) X} @tab @code{COMPLEX(4)} @tab f95, gnu
1439 @item @code{ZSIN(X)} @tab @code{COMPLEX(8) X} @tab @code{COMPLEX(8)} @tab f95, gnu
1440 @item @code{CDSIN(X)} @tab @code{COMPLEX(8) X} @tab @code{COMPLEX(8)} @tab f95, gnu
1441 @end multitable
1442 @end table
1443
1444
1445
1446
1447 @node SINH
1448 @section @code{SINH} --- Hyperbolic sine function
1449 @findex @code{SINH} intrinsic
1450 @findex @code{DSINH} intrinsic
1451 @cindex hyperbolic sine
1452
1453 @table @asis
1454 @item @emph{Description}:
1455 @code{SINH(X)} computes the hyperbolic sine of @var{X}.
1456
1457 @item @emph{Option}:
1458 f95, gnu
1459
1460 @item @emph{Type}:
1461 elemental function
1462
1463 @item @emph{Syntax}:
1464 @code{X = SINH(X)}
1465
1466 @item @emph{Arguments}:
1467 @multitable @columnfractions .15 .80
1468 @item @var{X} @tab The type shall be an @code{REAL(*)}.
1469 @end multitable
1470
1471 @item @emph{Return value}:
1472 The return value is of type @code{REAL(*)}.
1473
1474 @item @emph{Example}:
1475 @smallexample
1476 program test_sinh
1477 real(8) :: x = - 1.0_8
1478 x = sinh(x)
1479 end program test_sinh
1480 @end smallexample
1481
1482 @item @emph{Specific names}:
1483 @multitable @columnfractions .24 .24 .24 .24
1484 @item Name @tab Argument @tab Return type @tab Option
1485 @item @code{DSINH(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
1486 @end multitable
1487 @end table
1488
1489
1490
1491 @node SQRT
1492 @section @code{SQRT} --- Square-root function
1493 @findex @code{SQRT} intrinsic
1494 @findex @code{DSQRT} intrinsic
1495 @findex @code{CSQRT} intrinsic
1496 @findex @code{ZSQRT} intrinsic
1497 @findex @code{CDSQRT} intrinsic
1498 @cindex square-root
1499
1500 @table @asis
1501 @item @emph{Description}:
1502 @code{SQRT(X)} computes the square root of @var{X}.
1503
1504 @item @emph{Option}:
1505 f95, gnu
1506
1507 @item @emph{Type}:
1508 elemental function
1509
1510 @item @emph{Syntax}:
1511 @code{X = SQRT(X)}
1512
1513 @item @emph{Arguments}:
1514 @multitable @columnfractions .15 .80
1515 @item @var{X} @tab The type shall be an @code{REAL(*)} or
1516 @code{COMPLEX(*)}.
1517 @end multitable
1518
1519 @item @emph{Return value}:
1520 The return value is of type @code{REAL(*)} or @code{COMPLEX(*)}.
1521 The kind type parameter is the same as @var{X}.
1522
1523 @item @emph{Example}:
1524 @smallexample
1525 program test_sqrt
1526 real(8) :: x = 2.0_8
1527 complex :: z = (1.0, 2.0)
1528 x = sqrt(x)
1529 z = sqrt(z)
1530 end program test_sqrt
1531 @end smallexample
1532
1533 @item @emph{Specific names}:
1534 @multitable @columnfractions .24 .24 .24 .24
1535 @item Name @tab Argument @tab Return type @tab Option
1536 @item @code{DSQRT(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
1537 @item @code{CSQRT(X)} @tab @code{COMPLEX(4) X} @tab @code{COMPLEX(4)} @tab f95, gnu
1538 @item @code{ZSQRT(X)} @tab @code{COMPLEX(8) X} @tab @code{COMPLEX(8)} @tab f95, gnu
1539 @item @code{CDSQRT(X)} @tab @code{COMPLEX(8) X} @tab @code{COMPLEX(8)} @tab f95, gnu
1540 @end multitable
1541 @end table
1542
1543
1544
1545 @node TAN
1546 @section @code{TAN} --- Tangent function
1547 @findex @code{TAN} intrinsic
1548 @findex @code{DTAN} intrinsic
1549 @cindex tangent
1550
1551 @table @asis
1552 @item @emph{Description}:
1553 @code{TAN(X)} computes the tangent of @var{X}.
1554
1555 @item @emph{Option}:
1556 f95, gnu
1557
1558 @item @emph{Type}:
1559 elemental function
1560
1561 @item @emph{Syntax}:
1562 @code{X = TAN(X)}
1563
1564 @item @emph{Arguments}:
1565 @multitable @columnfractions .15 .80
1566 @item @var{X} @tab The type shall be an @code{REAL(*)}.
1567 @end multitable
1568
1569 @item @emph{Return value}:
1570 The return value is of type @code{REAL(*)}. The kind type parameter is
1571 the same as @var{X}.
1572
1573 @item @emph{Example}:
1574 @smallexample
1575 program test_tan
1576 real(8) :: x = 0.165_8
1577 x = tan(x)
1578 end program test_tan
1579 @end smallexample
1580
1581 @item @emph{Specific names}:
1582 @multitable @columnfractions .24 .24 .24 .24
1583 @item Name @tab Argument @tab Return type @tab Option
1584 @item @code{DTAN(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
1585 @end multitable
1586 @end table
1587
1588
1589 @node TANH
1590 @section @code{TANH} --- Hyperbolic tangent function
1591 @findex @code{TANH} intrinsic
1592 @findex @code{DTANH} intrinsic
1593 @cindex hyperbolic tangent
1594
1595 @table @asis
1596 @item @emph{Description}:
1597 @code{TANH(X)} computes the hyperbolic tangent of @var{X}.
1598
1599 @item @emph{Option}:
1600 f95, gnu
1601
1602 @item @emph{Type}:
1603 elemental function
1604
1605 @item @emph{Syntax}:
1606 @code{X = TANH(X)}
1607
1608 @item @emph{Arguments}:
1609 @multitable @columnfractions .15 .80
1610 @item @var{X} @tab The type shall be an @code{REAL(*)}.
1611 @end multitable
1612
1613 @item @emph{Return value}:
1614 The return value is of type @code{REAL(*)} and lies in the range
1615 @math{ - 1 \leq tanh(x) \leq 1 }.
1616
1617 @item @emph{Example}:
1618 @smallexample
1619 program test_tanh
1620 real(8) :: x = 2.1_8
1621 x = tanh(x)
1622 end program test_tanh
1623 @end smallexample
1624
1625 @item @emph{Specific names}:
1626 @multitable @columnfractions .24 .24 .24 .24
1627 @item Name @tab Argument @tab Return type @tab Option
1628 @item @code{DTANH(X)} @tab @code{REAL(8) X} @tab @code{REAL(8)} @tab f95, gnu
1629 @end multitable
1630 @end table
1631
1632
1633
1634 @comment gen associated
1635 @comment
1636 @comment gen atan2
1637 @comment datan2
1638 @comment
1639 @comment gen bit_size
1640 @comment
1641 @comment gen btest
1642 @comment
1643 @comment gen ceiling
1644 @comment
1645 @comment gen char
1646 @comment
1647 @comment gen cmplx
1648 @comment
1649 @comment gen command_argument_count
1650 @comment
1651 @comment gen conjg
1652 @comment dconjg
1653 @comment
1654 @comment gen count
1655 @comment
1656 @comment sub cpu_time
1657 @comment
1658 @comment gen cshift
1659 @comment
1660 @comment sub date_and_time
1661 @comment
1662 @comment gen dble
1663 @comment dfloat
1664 @comment
1665 @comment gen dcmplx
1666 @comment
1667 @comment gen digits
1668 @comment
1669 @comment gen dim
1670 @comment idim
1671 @comment ddim
1672 @comment
1673 @comment gen dot_product
1674 @comment
1675 @comment gen dprod
1676 @comment
1677 @comment gen dreal
1678 @comment
1679 @comment sub dtime
1680 @comment
1681 @comment gen eoshift
1682 @comment
1683 @comment gen epsilon
1684 @comment
1685 @comment gen etime
1686 @comment sub etime
1687 @comment
1688 @comment sub exit
1689 @comment
1690 @comment gen exponent
1691 @comment
1692 @comment gen floor
1693 @comment
1694 @comment sub flush
1695 @comment
1696 @comment gen fnum
1697 @comment
1698 @comment gen fraction
1699 @comment
1700 @comment gen fstat
1701 @comment sub fstat
1702 @comment
1703 @comment sub getarg
1704 @comment
1705 @comment gen getcwd
1706 @comment sub getcwd
1707 @comment
1708 @comment sub getenv
1709 @comment
1710 @comment gen getgid
1711 @comment
1712 @comment gen getpid
1713 @comment
1714 @comment gen getuid
1715 @comment
1716 @comment sub get_command
1717 @comment
1718 @comment sub get_command_argument
1719 @comment
1720 @comment sub get_environment_variable
1721 @comment
1722 @comment gen huge
1723 @comment
1724 @comment gen iachar
1725 @comment
1726 @comment gen iand
1727 @comment
1728 @comment gen iargc
1729 @comment
1730 @comment gen ibclr
1731 @comment
1732 @comment gen ibits
1733 @comment
1734 @comment gen ibset
1735 @comment
1736 @comment gen ichar
1737 @comment
1738 @comment gen ieor
1739 @comment
1740 @comment gen index
1741 @comment
1742 @comment gen int
1743 @comment ifix
1744 @comment idint
1745 @comment
1746 @comment gen ior
1747 @comment
1748 @comment gen irand
1749 @comment
1750 @comment gen ishft
1751 @comment
1752 @comment gen ishftc
1753 @comment
1754 @comment gen kind
1755 @comment
1756 @comment gen lbound
1757 @comment
1758 @comment gen len
1759 @comment
1760 @comment gen len_trim
1761 @comment
1762 @comment gen lge
1763 @comment
1764 @comment gen lgt
1765 @comment
1766 @comment gen lle
1767 @comment
1768 @comment gen llt
1769 @comment
1770 @comment gen logical
1771 @comment
1772 @comment gen matmul
1773 @comment
1774 @comment gen max
1775 @comment max0
1776 @comment amax0
1777 @comment amax1
1778 @comment max1
1779 @comment dmax1
1780 @comment
1781 @comment gen maxexponent
1782 @comment
1783 @comment gen maxloc
1784 @comment
1785 @comment gen maxval
1786 @comment
1787 @comment gen merge
1788 @comment
1789 @comment gen min
1790 @comment min0
1791 @comment amin0
1792 @comment amin1
1793 @comment min1
1794 @comment dmin1
1795 @comment
1796 @comment gen minexponent
1797 @comment
1798 @comment gen minloc
1799 @comment
1800 @comment gen minval
1801 @comment
1802 @comment gen mod
1803 @comment amod
1804 @comment dmod
1805 @comment
1806 @comment gen modulo
1807 @comment
1808 @comment sub mvbits
1809 @comment
1810 @comment gen nearest
1811 @comment
1812 @comment gen nint
1813 @comment idnint
1814 @comment
1815 @comment gen not
1816 @comment
1817 @comment gen null
1818 @comment
1819 @comment gen pack
1820 @comment
1821 @comment gen precision
1822 @comment
1823 @comment gen present
1824 @comment
1825 @comment gen product
1826 @comment
1827 @comment gen radix
1828 @comment
1829 @comment gen rand
1830 @comment ran
1831 @comment
1832 @comment sub random_number
1833 @comment
1834 @comment sub random_seed
1835 @comment
1836 @comment gen range
1837 @comment
1838 @comment gen real
1839 @comment float
1840 @comment sngl
1841 @comment
1842 @comment gen repeat
1843 @comment
1844 @comment gen reshape
1845 @comment
1846 @comment gen rrspacing
1847 @comment
1848 @comment gen scale
1849 @comment
1850 @comment gen scan
1851 @comment
1852 @comment gen second
1853 @comment sub second
1854 @comment
1855 @comment gen selected_int_kind
1856 @comment
1857 @comment gen selected_real_kind
1858 @comment
1859 @comment gen set_exponent
1860 @comment
1861 @comment gen shape
1862 @comment
1863 @comment gen sign
1864 @comment isign
1865 @comment dsign
1866 @comment
1867 @comment gen size
1868 @comment
1869 @comment gen spacing
1870 @comment
1871 @comment gen spread
1872 @comment
1873 @comment sub srand
1874 @comment
1875 @comment gen stat
1876 @comment sub stat
1877 @comment
1878 @comment gen sum
1879 @comment
1880 @comment gen system
1881 @comment sub system
1882 @comment
1883 @comment sub system_clock
1884 @comment
1885 @comment gen tiny
1886 @comment
1887 @comment gen transfer
1888 @comment
1889 @comment gen transpose
1890 @comment
1891 @comment gen trim
1892 @comment
1893 @comment gen ubound
1894 @comment
1895 @comment gen umask
1896 @comment sub umask
1897 @comment
1898 @comment gen unlink
1899 @comment sub unlink
1900 @comment
1901 @comment gen unpack
1902 @comment
1903 @comment gen verify
1904
This page took 0.124624 seconds and 5 git commands to generate.