LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
la_xisnan.F90
Go to the documentation of this file.
2 interface la_isnan
3
4 module procedure sisnan
5 module procedure disnan
6
7 end interface
8
9contains
10
11 logical function sisnan( x )
12 use la_constants, only: wp=>sp
13#ifdef USE_IEEE_INTRINSIC
14 use, intrinsic :: ieee_arithmetic
15#elif USE_ISNAN
16 intrinsic :: isnan
17#endif
18 real(wp) :: x
19#ifdef USE_IEEE_INTRINSIC
20 sisnan = ieee_is_nan(x)
21#elif USE_ISNAN
22 sisnan = isnan(x)
23#else
24 sisnan = slaisnan(x,x)
25
26 contains
27 logical function slaisnan( x, y )
28 use la_constants, only: wp=>sp
29 real(wp) :: x, y
30 slaisnan = ( x.ne.y )
31 end function slaisnan
32#endif
33 end function sisnan
34
35 logical function disnan( x )
36 use la_constants, only: wp=>dp
37#ifdef USE_IEEE_INTRINSIC
38 use, intrinsic :: ieee_arithmetic
39#elif USE_ISNAN
40 intrinsic :: isnan
41#endif
42 real(wp) :: x
43#ifdef USE_IEEE_INTRINSIC
44 disnan = ieee_is_nan(x)
45#elif USE_ISNAN
46 disnan = isnan(x)
47#else
48 disnan = dlaisnan(x,x)
49
50 contains
51 logical function dlaisnan( x, y )
52 use la_constants, only: wp=>dp
53 real(wp) :: x, y
54 dlaisnan = ( x.ne.y )
55 end function dlaisnan
56#endif
57 end function disnan
58
59end module la_xisnan
logical function disnan(din)
DISNAN tests input for NaN.
Definition disnan.f:59
logical function dlaisnan(din1, din2)
DLAISNAN tests input for NaN by comparing two arguments for inequality.
Definition dlaisnan.f:74
logical function slaisnan(x, y)
Definition la_xisnan.F90:28
integer, parameter dp
integer, parameter sp
LA_CONSTANTS is a module for the scaling constants for the compiled Fortran single and double precisi...
logical function sisnan(x)
Definition la_xisnan.F90:12