Home | History | Annotate | Line # | Download | only in test
      1 /****************************************************************
      2 
      3 The author of this software is David M. Gay.
      4 
      5 Copyright (C) 2002 by Lucent Technologies
      6 All Rights Reserved
      7 
      8 Permission to use, copy, modify, and distribute this software and
      9 its documentation for any purpose and without fee is hereby
     10 granted, provided that the above copyright notice appear in all
     11 copies and that both that the copyright notice and this
     12 permission notice and warranty disclaimer appear in supporting
     13 documentation, and that the name of Lucent or any of its entities
     14 not be used in advertising or publicity pertaining to
     15 distribution of the software without specific, written prior
     16 permission.
     17 
     18 LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
     19 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
     20 IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
     21 SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     22 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
     23 IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     24 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
     25 THIS SOFTWARE.
     26 
     27 ****************************************************************/
     28 
     29 #include <stdio.h>
     30 
     31  int
     32 main(void)
     33 {
     34 	union { long double d; unsigned int bits[4]; } u, w;
     35 	switch(sizeof(long double)) {
     36 	  case 16:
     37 		w.bits[0] = w.bits[3] = 0;
     38 		w.d = 1.;
     39 		u.d = 3.;
     40 		w.d = w.d / u.d;
     41 		if (w.bits[0] && w.bits[3])
     42 			printf("cp x.ou0 x.out; cp xL.ou0 xL.out;"
     43 				" cp Q.ou1 Q.out; cp pftestQ.out pftest.out\n");
     44 		else
     45 			printf("cp x.ou0 x.out; cp xL.ou0 xL.out;"
     46 				" cp Q.ou0 Q.out; cp pftestx.out pftest.out\n");
     47 		break;
     48 	  case 10:
     49 	  case 12:
     50 		printf("cp x.ou1 x.out; cp xL.ou1 xL.out; cp Q.ou0 Q.out;"
     51 			" cp pftestx.out pftest.out\n");
     52 		break;
     53 	  default:
     54 		printf("cp x.ou0 x.out; cp xL.ou0 xL.out; cp Q.ou0 Q.out;"
     55 			" cp pftestx.out pftest.out\n");
     56 	  }
     57 	return 0;
     58 	}
     59