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

◆ pslachkieee_()

void pslachkieee_ ( Int isieee,
float *  rmax,
float *  rmin 
)

Definition at line 145 of file pslaiect.c.

146{
147/*
148*
149* Purpose
150* =======
151*
152* pslachkieee performs a simple check to make sure that the features
153* of the IEEE standard that we rely on are implemented. In some
154* implementations, pslachkieee may not return.
155*
156* Note that all arguments are call-by-reference so that this routine
157* can be directly called from Fortran code.
158*
159* This is a ScaLAPACK internal subroutine and arguments are not
160* checked for unreasonable values.
161*
162* Arguments
163* =========
164*
165* ISIEEE (local output) INTEGER
166* On exit, ISIEEE = 1 implies that all the features of the
167* IEEE standard that we rely on are implemented.
168* On exit, ISIEEE = 0 implies that some the features of the
169* IEEE standard that we rely on are missing.
170*
171* RMAX (local input) REAL
172* The overflow threshold ( = SLAMCH('O') ).
173*
174* RMIN (local input) REAL
175* The underflow threshold ( = SLAMCH('U') ).
176*
177* =====================================================================
178*
179* .. Local Scalars ..
180*/
181 float x, pinf, pzero, ninf, nzero;
182 Int ieflag, *ix, sbit1, sbit2, negone=-1, errornum;
183/* ..
184* .. Executable Statements ..
185*/
186
187 pslasnbt_( &ieflag );
188
189 pinf = *rmax / *rmin;
190 pzero = 1.0 / pinf;
191 pinf = 1.0 / pzero;
192
193 if( pzero != 0.0 ){
194 printf("pzero = %g should be zero\n",pzero);
195 *isieee = 0;
196 return ;
197 }
198 if( ieflag == 1 ){
199 sbit1 = (*((Int *)&pzero) >> 31) & 1;
200 sbit2 = (*((Int *)&pinf) >> 31) & 1;
201 }
202 if( sbit1 == 1 ){
203 printf("Sign of positive infinity is incorrect\n");
204 *isieee = 0;
205 }
206 if( sbit2 == 1 ){
207 printf("Sign of positive zero is incorrect\n");
208 *isieee = 0;
209 }
210
211 ninf = -pinf;
212 nzero = 1.0 / ninf;
213 ninf = 1.0 / nzero;
214
215 if( nzero != 0.0 ){
216 printf("nzero = %g should be zero\n",nzero);
217 *isieee = 0;
218 }
219 if( ieflag == 1 ){
220 sbit1 = (*((Int *)&nzero) >> 31) & 1;
221 sbit2 = (*((Int *)&ninf) >> 31) & 1;
222 }
223 if( sbit1 == 0 ){
224 printf("Sign of negative infinity is incorrect\n");
225 *isieee = 0;
226 }
227 if( sbit2 == 0 ){
228 printf("Sign of negative zero is incorrect\n");
229 *isieee = 0;
230 }
231}
#define Int
Definition Bconfig.h:22
void pslasnbt_(Int *ieflag)
Definition pslaiect.c:23
Here is the call graph for this function: