SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ pdlasnbt_()

void pdlasnbt_ ( Int ieflag)

Definition at line 23 of file pdlaiect.c.

24{
25/*
26*
27* Purpose
28* =======
29*
30* pdalsnbt finds the position of the signbit of a double
31* double precision floating point number. This routine assumes IEEE
32* arithmetic, and hence, tests only the 32nd and 64th bits as
33* possibilities for the sign bit.
34*
35* Note : For this release, we assume that sizeof(int) is 4 bytes.
36*
37* Note : If a compile time flag (NO_IEEE) indicates that the
38* machine does not have IEEE arithmetic, IEFLAG = 0 is returned.
39*
40* Arguments
41* =========
42*
43* IEFLAG (output) INTEGER
44* This indicates the position of the signbit of any double
45* precision floating point number.
46* IEFLAG = 0 if the compile time flag, NO_IEEE, indicates
47* that the machine does not have IEEE arithmetic, or if
48* sizeof(int) is different from 4 bytes.
49* IEFLAG = 1 indicates that the sign bit is the 32nd
50* bit ( Big Endian ).
51* IEFLAG = 2 indicates that the sign bit is the 64th
52* bit ( Little Endian ).
53*
54* =====================================================================
55*
56* .. Local Scalars ..
57*/
58 double x;
59 Int negone=-1, errornum;
60 unsigned Int *ix;
61/* ..
62* .. Executable Statements ..
63*/
64
65#ifdef NO_IEEE
66 *ieflag = 0;
67#else
68 if(sizeof(Int) != 4){
69 *ieflag = 0;
70 return;
71 }
72 x = (double) -1.0;
73 ix = (unsigned Int *) &x;
74 if(( *ix == 0xbff00000) && ( *(ix+1) == 0x0) )
75 {
76 *ieflag = 1;
77 } else if(( *(ix+1) == 0xbff00000) && ( *ix == 0x0) ) {
78 *ieflag = 2;
79 } else {
80 *ieflag = 0;
81 }
82#endif
83}
#define Int
Definition Bconfig.h:22
Here is the caller graph for this function: