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

◆ pslasnbt_()

void pslasnbt_ ( Int ieflag)

Definition at line 23 of file pslaiect.c.

24{
25/*
26*
27* Purpose
28* =======
29*
30* psalsnbt finds the position of the signbit of a single
31* precision floating point number. This routine assumes IEEE
32* arithmetic, and hence, tests only the 32nd bit as a possibility
33* 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 single
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 bit.
50*
51* =====================================================================
52*
53* .. Local Scalars ..
54*/
55 float x;
56 Int negone=-1, errornum;
57 unsigned Int *ix;
58/* ..
59* .. Executable Statements ..
60*/
61
62#ifdef NO_IEEE
63 *ieflag = 0;
64#else
65 if(sizeof(Int) != 4){
66 *ieflag = 0;
67 return;
68 }
69 x = (float) -1.0;
70 ix = (unsigned Int *) &x;
71 if( *ix == 0xbff00000 )
72 {
73 *ieflag = 1;
74 } else {
75 *ieflag = 0;
76 }
77#endif
78}
#define Int
Definition Bconfig.h:22
Here is the caller graph for this function: