IMEX_SfloW2D  0.9
Shallowwatergranularflowmodel
complexify.f90
Go to the documentation of this file.
1 !******************************************************************************
2 ! Written for 'complexify.py 1.3'
3 ! J.R.R.A.Martins 1999
4 ! 21-Apr-00 Fixed tan, sinh, cosh
5 ! sign now returns complex
6 ! added log10 and nint
7 ! changed ==, /= and >= -- see comments below
8 ! 20-May-00 added cosd, sind, and epsilon
9 ! 11-Jul-00 took away cosd, sind (they are reserved, but not
10 ! intrinsic functions in F90)
11 ! 21-Jul-00 converted all trig functions to the value/derivative
12 ! formulas -- not general complex number formulas
13 ! 15-Aug-00 Fixed bug in atan2 formula and added the rest of the
14 ! _ci and _ic cominations to the relational operators.
15 ! P. Sturdza
16 !
17 !******************************************************************************
18 !
19 ! Assume all code is compiled with double precision (-r8 compiler flag)
20 !
21 
22 !TODO:
23 ! more typ combinations: cc, cr, rc, ic ?
24 ! check all fcns
25 !
26 
27 module complexify
28 
29  implicit none
30 
31 ! ABS
32  interface abs
33  module procedure abs_c
34  end interface
35 
36 ! COSD
37 ! interface cosd
38 ! module procedure cosd_c
39 ! end interface
40 
41 ! ACOS
42  interface acos
43  module procedure acos_c
44  end interface
45 
46 ! SIND
47 ! interface sind
48 ! module procedure sind_c
49 ! end interface
50 
51 ! ASIN
52  interface asin
53  module procedure asin_c
54  end interface
55 
56 ! ATAN
57  interface atan
58  module procedure atan_c
59  end interface
60 
61 ! ATAN2
62  interface atan2
63  module procedure atan2_cc
64  end interface
65 
66 ! COSH
67  interface cosh
68  module procedure cosh_c
69  end interface
70 
71 ! MAX (limited to 2-4 complex args, 2 mixed args)
72  interface max
73  module procedure max_cc
74  module procedure max_cr
75  module procedure max_rc
76  module procedure max_ccc ! added because of DFLUX.f
77  module procedure max_cccc ! added because of DFLUX.f
78  end interface
79 
80 ! MIN (limited to 2-4 complex args, 2 mixed args)
81  interface min
82  module procedure min_cc
83  module procedure min_cr
84  module procedure min_rc
85  module procedure min_ccc
86  module procedure min_cccc
87  end interface
88 
89 ! SIGN
90  interface sign
91  module procedure sign_cc
92  module procedure sign_cr
93  module procedure sign_rc
94  end interface
95 
96 ! DIM
97  interface dim
98  module procedure dim_cc
99  module procedure dim_cr
100  module procedure dim_rc
101  end interface
102 
103 ! SINH
104  interface sinh
105  module procedure sinh_c
106  end interface
107 
108 ! TAN
109  interface tan
110  module procedure tan_c
111  end interface
112 
113 ! TANH
114  interface tanh
115  module procedure tanh_c
116  end interface
117 
118 ! LOG10
119  interface log10
120  module procedure log10_c
121  end interface
122 
123 ! NINT
124  interface nint
125  module procedure nint_c
126  end interface
127 
128 ! EPSILON
129  interface epsilon
130  module procedure epsilon_c
131  end interface
132 
133 ! <
134  interface operator (<)
135  module procedure lt_cc
136  module procedure lt_cr
137  module procedure lt_rc
138  module procedure lt_ci
139  module procedure lt_ic
140  end interface
141 
142 ! <=
143  interface operator (<=)
144  module procedure le_cc
145  module procedure le_cr
146  module procedure le_rc
147  module procedure le_ci
148  module procedure le_ic
149  end interface
150 
151 ! >
152  interface operator (>)
153  module procedure gt_cc
154  module procedure gt_cr
155  module procedure gt_rc
156  module procedure gt_ci
157  module procedure gt_ic
158  end interface
159 
160 !! MIPSpro Compilers: Version 7.30 won't take .ge. and .eq..
161 !! But pgf90 on Linux doesn't complain, go figure.
162 !! It looks like a strict interpretation of FORTRAN should
163 !! not allow overloading of .eq. and .ne. since they already
164 !! have a definition for type complex, so define new operators
165 !! called .ceq., .cne. and, for MIPS, .cge.
166 !!
167 !! comment out (and uncomment) the appropriate versions for
168 !! your compiler
169 !!
170 ! >=
171  interface operator (>=)
172  module procedure ge_cc
173  module procedure ge_cr
174  module procedure ge_rc
175  module procedure ge_ci
176  module procedure ge_ic
177  end interface
178 ! interface operator (.cge.)
179 ! module procedure ge_cc
180 ! module procedure ge_rr
181 ! module procedure ge_ii
182 ! module procedure ge_aa
183 ! module procedure ge_cr
184 ! module procedure ge_rc
185 ! module procedure ge_ci
186 ! module procedure ge_ic
187 ! module procedure ge_ir
188 ! module procedure ge_ri
189 ! end interface
190 
191 ! ==
192 ! interface operator (==)
193 ! module procedure eq_cc
194 ! module procedure eq_cr
195 ! module procedure eq_rc
196 ! module procedure eq_ci
197 ! module procedure eq_ic
198 ! end interface
199  interface operator (.ceq.)
200  module procedure eq_cc
201  module procedure eq_rr
202  module procedure eq_ii
203  module procedure eq_aa
204  module procedure eq_cr
205  module procedure eq_rc
206  module procedure eq_ci
207  module procedure eq_ic
208  module procedure eq_ir
209  module procedure eq_ri
210  end interface
211 
212 ! /=
213 ! interface operator (/=)
214 ! module procedure ne_cc
215 ! module procedure ne_cr
216 ! module procedure ne_rc
217 ! module procedure ne_ci
218 ! module procedure ne_ic
219 ! end interface
220  interface operator (.cne.)
221  module procedure ne_cc
222  module procedure ne_rr
223  module procedure ne_ii
224  module procedure ne_aa
225  module procedure ne_cr
226  module procedure ne_rc
227  module procedure ne_ci
228  module procedure ne_ic
229  module procedure ne_ir
230  module procedure ne_ri
231  end interface
232 
233 contains
234 
235 !******************************************************************************
236 !
237 ! Function definitions
238 !
239 !******************************************************************************
240 
241 ! ABS, intrinsic
242  complex*16 function abs_c(val)
243  complex*16, intent(in) :: val
244  abs_c = val
245  if (real(val) < 0) abs_c = cmplx(-real(val),-aimag(val))
246  return
247  end function abs_c
248 
249 ! COSD
250 ! complex*16 function cosd_c(z)
251 ! complex*16, intent(in) :: z
252 ! cosd_c = cos(z*3.14159265358979323846/180.)
253 ! end function cosd_c
254 
255 ! SIND
256 ! complex*16 function sind_c(z)
257 ! complex*16, intent(in) :: z
258 ! sind_c = sin(z*3.14159265358979323846/180.)
259 ! end function sind_c
260 
261 ! ACOS
262  complex*16 function acos_c(z)
263  complex*16, intent(in) :: z
264 ! acos_c = - cmplx(0., 1.)*log(z+sqrt(z**2-1.))
265 ! not general complex valued formula:
266  acos_c = cmplx(acos(real(z)),-aimag(z)/sqrt(1.-real(z)**2))
267  return
268  end function acos_c
269 
270 ! ASIN
271  complex*16 function asin_c(z)
272  complex*16, intent(in) :: z
273 ! asin_c = - cmplx(0., 1.)*log(cmplx(0.,1.)*z+sqrt(1.-z**2))
274 ! not general complex valued formula:
275  asin_c = cmplx(asin(real(z)),aimag(z)/sqrt(1.-real(z)**2))
276  return
277  end function asin_c
278 
279 ! ATAN
280  complex*16 function atan_c(z)
281  complex*16, intent(in) :: z
282 ! complex*16 z2
283 ! real*8 pi2, xans, yans, r, r2, x, y
284 ! pi2 = 2.0*atan(1.0)
285 ! r = sqrt(real(z)**2+aimag(z)**2)
286 ! x = real(z)
287 ! y = aimag(z)
288 ! r2 = r*r
289 ! xans = 0.5*atan2 (2.0*x, 1.0-r2)
290 ! yans = 0.25*log((r2+2.0*y+1.0)/(r2-2.0*y+1.0))
291 ! atan_c = cmplx (xans, yans)
292 ! not general complex valued formula:
293  atan_c = cmplx(atan(real(z)),aimag(z)/(1.+real(z)**2))
294  return
295  end function atan_c
296 
297 ! ATAN2
298  complex*16 function atan2_cc(csn, ccs)
299  complex*16, intent(in) :: csn, ccs
300 ! real*8 pi
301 ! pi = 4.0*atan(1.0)
302 ! if (sqrt(real(ccs)**2 + aimag(ccs)**2).eq.0.) then ! abs orig
303 ! if (sqrt(real(csn)**2+aimag(csn)**2).eq.0.) then
304 ! atan2_cc = cmplx(0.0)
305 ! else
306 ! atan2_cc = cmplx(sign(0.5*pi,real(csn)), 0.0)
307 ! end if
308 ! else
309 ! atan2_cc = atan(csn/ccs)
310 ! if (real(ccs).lt.0.) atan2_cc = atan2_cc + pi
311 ! if (real(atan2_cc).gt.pi) atan2_cc = atan2_cc - 2.0*pi
312 ! end if
313 ! not general complex valued formula:
314  real*8 a,b,c,d
315  a=real(csn)
316  b=aimag(csn)
317  c=real(ccs)
318  d=aimag(ccs)
319  atan2_cc=cmplx(atan2(a,c),(c*b-a*d)/(a**2+c**2))
320  return
321  end function atan2_cc
322 
323 ! COSH
324  complex*16 function cosh_c(z)
325  complex*16, intent(in) :: z
326 ! complex*16 eplus, eminus
327 ! eplus = exp(z)
328 ! eminus = exp(z)
329 ! cosh_c = (eplus + eminus)/2.
330 ! not general complex valued formula:
331  cosh_c=cmplx(cosh(real(z)),aimag(z)*sinh(real(z)))
332  return
333  end function cosh_c
334 
335 ! SINH
336  complex*16 function sinh_c(z)
337  complex*16, intent(in) :: z
338 ! complex*16 eplus, eminus
339 ! eplus = exp(z)
340 ! eminus = exp(z)
341 ! sinh_c = (eplus - eminus)/2.
342 ! not general complex valued formula:
343  sinh_c=cmplx(sinh(real(z)),aimag(z)*cosh(real(z)))
344  return
345  end function sinh_c
346 
347 ! TAN
348  complex*16 function tan_c(z)
349  complex*16, intent(in) :: z
350 ! complex*16 eiplus, eiminus
351 ! eiplus = exp(cmplx(0.,1.)*z)
352 ! eiminus = exp(-cmplx(0.,1.)*z)
353 ! tan_c = cmplx(0.,1.)*(eiminus - eiplus)/(eiplus + eiminus)
354 ! not general complex valued formula:
355  tan_c=cmplx(tan(real(z)),aimag(z)/cos(real(z))**2)
356  return
357  end function tan_c
358 
359 ! TANH
360  complex*16 function tanh_c(a)
361  complex*16, intent(in) :: a
362 ! complex*16 eplus, eminus
363 ! if(real(a) > 50)then
364 ! tanh_c = 1.
365 ! else
366 ! eplus = exp(a)
367 ! eminus = exp(-a)
368 ! tanh_c = (eplus - eminus)/(eplus + eminus)
369 ! end if
370 ! not general complex valued formula:
371  tanh_c=cmplx(tanh(real(a)),aimag(a)/cosh(real(a))**2)
372  return
373  end function tanh_c
374 
375 ! MAX, intrinsic
376  complex*16 function max_cc(val1, val2)
377  complex*16, intent(in) :: val1, val2
378  if (real(val1) > real(val2)) then
379  max_cc = val1
380  else
381  max_cc = val2
382  endif
383  return
384  end function max_cc
385  complex*16 function max_cr(val1, val2)
386  complex*16, intent(in) :: val1
387  real*8, intent(in) :: val2
388  if (real(val1) > val2) then
389  max_cr = val1
390  else
391  max_cr = cmplx(val2, 0.)
392  endif
393  return
394  end function max_cr
395  complex*16 function max_rc(val1, val2)
396  real*8, intent(in) :: val1
397  complex*16, intent(in) :: val2
398  if (val1 > real(val2)) then
399  max_rc = cmplx(val1, 0.)
400  else
401  max_rc = val2
402  endif
403  return
404  end function max_rc
405  complex*16 function max_ccc(val1, val2, val3)
406  complex*16, intent(in) :: val1, val2, val3
407  if (real(val1) > real(val2)) then
408  max_ccc = val1
409  else
410  max_ccc = val2
411  endif
412  if (real(val3) > real(max_ccc)) then
413  max_ccc = val3
414  endif
415  return
416  end function max_ccc
417  function max_cccc(val1, val2, val3, val4)
418  complex*16, intent(in) :: val1, val2, val3, val4
419  complex*16 max_cccc
420  complex*16 max_cccc2
421  if (real(val1) > real(val2)) then
422  max_cccc = val1
423  else
424  max_cccc = val2
425  endif
426  if (real(val3) > real(val4)) then
427  max_cccc2 = val3
428  else
429  max_cccc2 = val4
430  endif
431  if (real(max_cccc2) > real(max_cccc)) then
432  max_cccc = max_cccc2
433  endif
434  return
435  end function max_cccc
436 
437 ! MIN, intrinsic
438  complex*16 function min_cc(val1, val2)
439  complex*16, intent(in) :: val1, val2
440  if (real(val1) < real(val2)) then
441  min_cc = val1
442  else
443  min_cc = val2
444  endif
445  return
446  end function min_cc
447  complex*16 function min_cr(val1, val2)
448  complex*16, intent(in) :: val1
449  real*8, intent(in) :: val2
450  if (real(val1) < val2) then
451  min_cr = val1
452  else
453  min_cr = cmplx(val2, 0.)
454  endif
455  return
456  end function min_cr
457  complex*16 function min_rc(val1, val2)
458  real*8, intent(in) :: val1
459  complex*16, intent(in) :: val2
460  if (val1 < real(val2)) then
461  min_rc = cmplx(val1, 0.)
462  else
463  min_rc = val2
464  endif
465  return
466  end function min_rc
467  complex*16 function min_ccc(val1, val2, val3)
468  complex*16, intent(in) :: val1, val2, val3
469  if (real(val1) < real(val2)) then
470  min_ccc = val1
471  else
472  min_ccc = val2
473  endif
474  if (real(val3) < real(min_ccc)) then
475  min_ccc = val3
476  endif
477  return
478  end function min_ccc
479  function min_cccc(val1, val2, val3, val4)
480  complex*16, intent(in) :: val1, val2, val3, val4
481  complex*16 min_cccc
482  complex*16 min_cccc2
483  if (real(val1) < real(val2)) then
484  min_cccc = val1
485  else
486  min_cccc = val2
487  endif
488  if (real(val3) < real(val4)) then
489  min_cccc2 = val3
490  else
491  min_cccc2 = val4
492  endif
493  if (real(min_cccc2) < real(min_cccc)) then
494  min_cccc = min_cccc2
495  endif
496  return
497  end function min_cccc
498 
499 
500 ! SIGN, intrinsic, assume that val1 is always a complex*16
501 ! in reality could be int
502  complex*16 function sign_cc(val1, val2)
503  complex*16, intent(in) :: val1, val2
504  real*8 sign
505  if (real(val2) < 0.) then
506  sign = -1.
507  else
508  sign = 1.
509  endif
510  sign_cc = sign * val1
511  return
512  end function sign_cc
513  complex*16 function sign_cr(val1, val2)
514  complex*16, intent(in) :: val1
515  real*8, intent(in) :: val2
516  real*8 sign
517  if (real(val2) < 0.) then
518  sign = -1.
519  else
520  sign = 1.
521  endif
522  sign_cr = sign * val1
523  return
524  end function sign_cr
525  complex*16 function sign_rc(val1, val2)
526  real*8, intent(in) :: val1
527  complex*16, intent(in) :: val2
528  real*8 sign
529  if (real(val2) < 0.) then
530  sign = -1.
531  else
532  sign = 1.
533  endif
534  sign_rc = sign * val1
535  return
536  end function sign_rc
537 
538 ! DIM, intrinsic
539  complex*16 function dim_cc(val1, val2)
540  complex*16, intent(in) :: val1, val2
541  if (val1 > val2) then
542  dim_cc = val1 - val2
543  else
544  dim_cc = cmplx(0., 0.)
545  endif
546  return
547  end function dim_cc
548  complex*16 function dim_cr(val1, val2)
549  complex*16, intent(in) :: val1
550  real*8, intent(in) :: val2
551  if (val1 > val2) then
552  dim_cr = val1 - cmplx(val2, 0.)
553  else
554  dim_cr = cmplx(0., 0.)
555  endif
556  return
557  end function dim_cr
558  complex*16 function dim_rc(val1, val2)
559  real*8, intent(in) :: val1
560  complex*16, intent(in) :: val2
561  if (val1 > val2) then
562  dim_rc = cmplx(val1, 0.) - val2
563  else
564  dim_rc = cmplx(0., 0.)
565  endif
566  return
567  end function dim_rc
568 
569 ! LOG10
570  complex*16 function log10_c(z)
571  complex*16, intent(in) :: z
572  log10_c=log(z)/log((10.0,0.0))
573  end function log10_c
574 
575 ! NINT
576  integer function nint_c(z)
577  complex*16, intent(in) :: z
578  nint_c=nint(real(z))
579  end function nint_c
580 
581 ! EPSILON !! bad news ulness compiled with -r8
582  complex*16 function epsilon_c(z)
583  complex*16, intent(in) :: z
584  epsilon_c=epsilon(real(z))
585  end function epsilon_c
586 
587 ! <, .lt.
588  logical function lt_cc(lhs, rhs)
589  complex*16, intent(in) :: lhs, rhs
590  lt_cc = real(lhs) < real(rhs)
591  end function lt_cc
592  logical function lt_cr(lhs, rhs)
593  complex*16, intent(in) :: lhs
594  real*8, intent(in) :: rhs
595  lt_cr = real(lhs) < rhs
596  end function lt_cr
597  logical function lt_rc(lhs, rhs)
598  real*8, intent(in) :: lhs
599  complex*16, intent(in) :: rhs
600  lt_rc = lhs < real(rhs)
601  end function lt_rc
602  logical function lt_ci(lhs, rhs)
603  complex*16, intent(in) :: lhs
604  integer, intent(in) :: rhs
605  lt_ci = real(lhs) < rhs
606  end function lt_ci
607  logical function lt_ic(lhs, rhs)
608  integer, intent(in) :: lhs
609  complex*16, intent(in) :: rhs
610  lt_ic = lhs < real(rhs)
611  end function lt_ic
612 
613 ! <=, .le.
614  logical function le_cc(lhs, rhs)
615  complex*16, intent(in) :: lhs, rhs
616  le_cc = real(lhs) <= real(rhs)
617  end function le_cc
618  logical function le_cr(lhs, rhs)
619  complex*16, intent(in) :: lhs
620  real*8, intent(in) :: rhs
621  le_cr = real(lhs) <= rhs
622  end function le_cr
623  logical function le_rc(lhs, rhs)
624  real*8, intent(in) :: lhs
625  complex*16, intent(in) :: rhs
626  le_rc = lhs <= real(rhs)
627  end function le_rc
628  logical function le_ci(lhs, rhs)
629  complex*16, intent(in) :: lhs
630  integer, intent(in) :: rhs
631  le_ci = real(lhs) <= rhs
632  end function le_ci
633  logical function le_ic(lhs, rhs)
634  integer, intent(in) :: lhs
635  complex*16, intent(in) :: rhs
636  le_ic = lhs <= real(rhs)
637  end function le_ic
638 
639 ! >, .gt.
640  logical function gt_cc(lhs, rhs)
641  complex*16, intent(in) :: lhs, rhs
642  gt_cc = real(lhs) > real(rhs)
643  end function gt_cc
644  logical function gt_cr(lhs, rhs)
645  complex*16, intent(in) :: lhs
646  real*8, intent(in) :: rhs
647  gt_cr = real(lhs) > rhs
648  end function gt_cr
649  logical function gt_rc(lhs, rhs)
650  real*8, intent(in) :: lhs
651  complex*16, intent(in) :: rhs
652  gt_rc = lhs > real(rhs)
653  end function gt_rc
654  logical function gt_ci(lhs, rhs)
655  complex*16, intent(in) :: lhs
656  integer, intent(in) :: rhs
657  gt_ci = real(lhs) > rhs
658  end function gt_ci
659  logical function gt_ic(lhs, rhs)
660  integer, intent(in) :: lhs
661  complex*16, intent(in) :: rhs
662  gt_ic = lhs > real(rhs)
663  end function gt_ic
664 
665 !! here are the redefined ones:
666 ! >=, .ge.
667  logical function ge_cc(lhs, rhs)
668  complex*16, intent(in) :: lhs, rhs
669  ge_cc = real(lhs) >= real(rhs)
670  end function ge_cc
671  logical function ge_rr(lhs, rhs)
672  real*8, intent(in) :: lhs, rhs
673  ge_rr = lhs >= rhs
674  end function ge_rr
675  logical function ge_ii(lhs, rhs)
676  integer, intent(in) :: lhs, rhs
677  ge_ii = lhs >= rhs
678  end function ge_ii
679  logical function ge_aa(lhs, rhs)
680  character(len=*), intent(in) :: lhs, rhs
681  ge_aa = lhs >= rhs
682  end function ge_aa
683  logical function ge_cr(lhs, rhs)
684  complex*16, intent(in) :: lhs
685  real*8, intent(in) :: rhs
686  ge_cr = real(lhs) >= rhs
687  end function ge_cr
688  logical function ge_rc(lhs, rhs)
689  real*8, intent(in) :: lhs
690  complex*16, intent(in) :: rhs
691  ge_rc = lhs >= real(rhs)
692  end function ge_rc
693  logical function ge_ci(lhs, rhs)
694  complex*16, intent(in) :: lhs
695  integer, intent(in) :: rhs
696  ge_ci = real(lhs) >= rhs
697  end function ge_ci
698  logical function ge_ic(lhs, rhs)
699  integer, intent(in) :: lhs
700  complex*16, intent(in) :: rhs
701  ge_ic = lhs >= real(rhs)
702  end function ge_ic
703  logical function ge_ir(lhs, rhs)
704  integer, intent(in) :: lhs
705  real*8, intent(in) :: rhs
706  ge_ir = lhs >= rhs
707  end function ge_ir
708  logical function ge_ri(lhs, rhs)
709  real*8, intent(in) :: lhs
710  integer, intent(in) :: rhs
711  ge_ri = lhs >= rhs
712  end function ge_ri
713 
714 ! ==, .eq.
715  logical function eq_cc(lhs, rhs)
716  complex*16, intent(in) :: lhs, rhs
717  eq_cc = real(lhs) == real(rhs)
718  end function eq_cc
719  logical function eq_rr(lhs, rhs)
720  real*8, intent(in) :: lhs, rhs
721  eq_rr = lhs == rhs
722  end function eq_rr
723  logical function eq_ii(lhs, rhs)
724  integer, intent(in) :: lhs, rhs
725  eq_ii = lhs == rhs
726  end function eq_ii
727  logical function eq_aa(lhs, rhs)
728  character(len=*), intent(in) :: lhs, rhs
729  eq_aa = lhs == rhs
730  end function eq_aa
731  logical function eq_cr(lhs, rhs)
732  complex*16, intent(in) :: lhs
733  real*8, intent(in) :: rhs
734  eq_cr = real(lhs) == rhs
735  end function eq_cr
736  logical function eq_rc(lhs, rhs)
737  real*8, intent(in) :: lhs
738  complex*16, intent(in) :: rhs
739  eq_rc = lhs == real(rhs)
740  end function eq_rc
741  logical function eq_ci(lhs, rhs)
742  complex*16, intent(in) :: lhs
743  integer, intent(in) :: rhs
744  eq_ci = real(lhs) == rhs
745  end function eq_ci
746  logical function eq_ic(lhs, rhs)
747  integer, intent(in) :: lhs
748  complex*16, intent(in) :: rhs
749  eq_ic = lhs == real(rhs)
750  end function eq_ic
751  logical function eq_ir(lhs, rhs)
752  integer, intent(in) :: lhs
753  real*8, intent(in) :: rhs
754  eq_ir = lhs == rhs
755  end function eq_ir
756  logical function eq_ri(lhs, rhs)
757  real*8, intent(in) :: lhs
758  integer, intent(in) :: rhs
759  eq_ri = lhs == rhs
760  end function eq_ri
761 
762 ! /=, .ne.
763  logical function ne_cc(lhs, rhs)
764  complex*16, intent(in) :: lhs, rhs
765  ne_cc = real(lhs) /= real(rhs)
766  end function ne_cc
767  logical function ne_rr(lhs, rhs)
768  real*8, intent(in) :: lhs, rhs
769  ne_rr = lhs /= rhs
770  end function ne_rr
771  logical function ne_ii(lhs, rhs)
772  integer, intent(in) :: lhs, rhs
773  ne_ii = lhs /= rhs
774  end function ne_ii
775  logical function ne_aa(lhs, rhs)
776  character(len=*), intent(in) :: lhs, rhs
777  ne_aa = lhs /= rhs
778  end function ne_aa
779  logical function ne_cr(lhs, rhs)
780  complex*16, intent(in) :: lhs
781  real*8, intent(in) :: rhs
782  ne_cr = real(lhs) /= rhs
783  end function ne_cr
784  logical function ne_rc(lhs, rhs)
785  real*8, intent(in) :: lhs
786  complex*16, intent(in) :: rhs
787  ne_rc = lhs /= real(rhs)
788  end function ne_rc
789  logical function ne_ci(lhs, rhs)
790  complex*16, intent(in) :: lhs
791  integer, intent(in) :: rhs
792  ne_ci = real(lhs) /= rhs
793  end function ne_ci
794  logical function ne_ic(lhs, rhs)
795  integer, intent(in) :: lhs
796  complex*16, intent(in) :: rhs
797  ne_ic = lhs /= real(rhs)
798  end function ne_ic
799  logical function ne_ir(lhs, rhs)
800  integer, intent(in) :: lhs
801  real*8, intent(in) :: rhs
802  ne_ir = lhs /= rhs
803  end function ne_ir
804  logical function ne_ri(lhs, rhs)
805  real*8, intent(in) :: lhs
806  integer, intent(in) :: rhs
807  ne_ri = lhs /= rhs
808  end function ne_ri
809 
810 end module complexify
complex *16 function max_ccc(val1, val2, val3)
Definition: complexify.f90:406
logical function ge_cc(lhs, rhs)
Definition: complexify.f90:668
logical function eq_ii(lhs, rhs)
Definition: complexify.f90:724
logical function le_ic(lhs, rhs)
Definition: complexify.f90:634
logical function eq_cc(lhs, rhs)
Definition: complexify.f90:716
complex *16 function max_cc(val1, val2)
Definition: complexify.f90:377
logical function lt_rc(lhs, rhs)
Definition: complexify.f90:598
complex *16 function sinh_c(z)
Definition: complexify.f90:337
logical function eq_ci(lhs, rhs)
Definition: complexify.f90:742
logical function ne_ii(lhs, rhs)
Definition: complexify.f90:772
logical function ne_aa(lhs, rhs)
Definition: complexify.f90:776
complex *16 function atan2_cc(csn, ccs)
Definition: complexify.f90:299
logical function lt_ic(lhs, rhs)
Definition: complexify.f90:608
logical function ge_ir(lhs, rhs)
Definition: complexify.f90:704
logical function gt_ic(lhs, rhs)
Definition: complexify.f90:660
complex *16 function min_cr(val1, val2)
Definition: complexify.f90:448
logical function ge_aa(lhs, rhs)
Definition: complexify.f90:680
complex *16 function min_rc(val1, val2)
Definition: complexify.f90:458
logical function gt_cc(lhs, rhs)
Definition: complexify.f90:641
complex *16 function dim_cr(val1, val2)
Definition: complexify.f90:549
logical function eq_rc(lhs, rhs)
Definition: complexify.f90:737
integer function nint_c(z)
Definition: complexify.f90:577
logical function ne_ic(lhs, rhs)
Definition: complexify.f90:795
complex *16 function max_cr(val1, val2)
Definition: complexify.f90:386
complex *16 function sign_rc(val1, val2)
Definition: complexify.f90:526
complex *16 function min_cccc(val1, val2, val3, val4)
Definition: complexify.f90:480
logical function eq_ic(lhs, rhs)
Definition: complexify.f90:747
logical function le_ci(lhs, rhs)
Definition: complexify.f90:629
logical function gt_cr(lhs, rhs)
Definition: complexify.f90:645
complex *16 function tanh_c(a)
Definition: complexify.f90:361
logical function eq_ri(lhs, rhs)
Definition: complexify.f90:757
complex *16 function log10_c(z)
Definition: complexify.f90:571
complex *16 function dim_cc(val1, val2)
Definition: complexify.f90:540
logical function ge_cr(lhs, rhs)
Definition: complexify.f90:684
logical function ge_ri(lhs, rhs)
Definition: complexify.f90:709
logical function ne_cc(lhs, rhs)
Definition: complexify.f90:764
logical function ne_ci(lhs, rhs)
Definition: complexify.f90:790
complex *16 function sign_cc(val1, val2)
Definition: complexify.f90:503
logical function eq_rr(lhs, rhs)
Definition: complexify.f90:720
complex *16 function acos_c(z)
Definition: complexify.f90:263
logical function gt_rc(lhs, rhs)
Definition: complexify.f90:650
complex *16 function sign_cr(val1, val2)
Definition: complexify.f90:514
logical function ge_ic(lhs, rhs)
Definition: complexify.f90:699
logical function ne_rc(lhs, rhs)
Definition: complexify.f90:785
complex *16 function min_cc(val1, val2)
Definition: complexify.f90:439
logical function ne_cr(lhs, rhs)
Definition: complexify.f90:780
logical function ge_rr(lhs, rhs)
Definition: complexify.f90:672
logical function ge_ci(lhs, rhs)
Definition: complexify.f90:694
logical function ne_ri(lhs, rhs)
Definition: complexify.f90:805
logical function le_cr(lhs, rhs)
Definition: complexify.f90:619
logical function ne_rr(lhs, rhs)
Definition: complexify.f90:768
complex *16 function asin_c(z)
Definition: complexify.f90:272
logical function ne_ir(lhs, rhs)
Definition: complexify.f90:800
logical function ge_ii(lhs, rhs)
Definition: complexify.f90:676
logical function lt_cc(lhs, rhs)
Definition: complexify.f90:589
logical function le_rc(lhs, rhs)
Definition: complexify.f90:624
complex *16 function max_rc(val1, val2)
Definition: complexify.f90:396
logical function gt_ci(lhs, rhs)
Definition: complexify.f90:655
complex *16 function min_ccc(val1, val2, val3)
Definition: complexify.f90:468
logical function ge_rc(lhs, rhs)
Definition: complexify.f90:689
complex *16 function abs_c(val)
Definition: complexify.f90:243
logical function le_cc(lhs, rhs)
Definition: complexify.f90:615
complex *16 function cosh_c(z)
Definition: complexify.f90:325
complex *16 function atan_c(z)
Definition: complexify.f90:281
logical function eq_ir(lhs, rhs)
Definition: complexify.f90:752
complex *16 function dim_rc(val1, val2)
Definition: complexify.f90:559
complex *16 function epsilon_c(z)
Definition: complexify.f90:583
complex *16 function tan_c(z)
Definition: complexify.f90:349
complex *16 function max_cccc(val1, val2, val3, val4)
Definition: complexify.f90:418
logical function eq_aa(lhs, rhs)
Definition: complexify.f90:728
logical function lt_ci(lhs, rhs)
Definition: complexify.f90:603
logical function lt_cr(lhs, rhs)
Definition: complexify.f90:593
logical function eq_cr(lhs, rhs)
Definition: complexify.f90:732