218{
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253 double x, pinf, pzero, ninf, nzero;
254 Int ieflag, *ix, sbit1, sbit2, negone=-1, errornum;
255
256
257
258
260
261 pinf = *rmax / *rmin;
262 pzero = 1.0 / pinf;
263 pinf = 1.0 / pzero;
264
265 if( pzero != 0.0 ){
266 printf("pzero = %g should be zero\n",pzero);
267 *isieee = 0;
268 return ;
269 }
270 if( ieflag == 1 ){
271 sbit1 = (*((
Int *)&pzero) >> 31) & 1;
272 sbit2 = (*((
Int *)&pinf) >> 31) & 1;
273 }else if(ieflag == 2){
274 sbit1 = (*(((
Int *)&pzero)+1) >> 31) & 1;
275 sbit2 = (*(((
Int *)&pinf)+1) >> 31) & 1;
276 }
277 if( sbit1 == 1 ){
278 printf("Sign of positive infinity is incorrect\n");
279 *isieee = 0;
280 }
281 if( sbit2 == 1 ){
282 printf("Sign of positive zero is incorrect\n");
283 *isieee = 0;
284 }
285
286 ninf = -pinf;
287 nzero = 1.0 / ninf;
288 ninf = 1.0 / nzero;
289
290 if( nzero != 0.0 ){
291 printf("nzero = %g should be zero\n",nzero);
292 *isieee = 0;
293 }
294 if( ieflag == 1 ){
295 sbit1 = (*((
Int *)&nzero) >> 31) & 1;
296 sbit2 = (*((
Int *)&ninf) >> 31) & 1;
297 }else if(ieflag == 2){
298 sbit1 = (*(((
Int *)&nzero)+1) >> 31) & 1;
299 sbit2 = (*(((
Int *)&ninf)+1) >> 31) & 1;
300 }
301 if( sbit1 == 0 ){
302 printf("Sign of negative infinity is incorrect\n");
303 *isieee = 0;
304 }
305 if( sbit2 == 0 ){
306 printf("Sign of negative zero is incorrect\n");
307 *isieee = 0;
308 }
309}
void pdlasnbt_(Int *ieflag)