Home | History | Annotate | Download | only in ppc
      1 #include <stdint.h>
      2 #include <stdio.h>
      3 
      4 long double __floatditf(int64_t);
      5 
      6 #include "floatunditf_test.h"
      7 #include "DD.h"
      8 
      9 int main(int argc, char *argv[]) {
     10 	int i;
     11 
     12 	DD expected;
     13 	DD computed;
     14 
     15 	for (i=0; i<numTests; ++i) {
     16 		expected.hi = tests[i].hi;
     17 		expected.lo = tests[i].lo;
     18 		computed.ld = __floatditf(tests[i].input);
     19 
     20 		if ((computed.hi != expected.hi) || (computed.lo != expected.lo))
     21 		{
     22 			printf("Error on __floatunditf( 0x%016llx ):\n", tests[i].input);
     23 			printf("\tExpected %La = ( %a , %a )\n", expected.ld, expected.hi, expected.lo);
     24 			printf("\tComputed %La = ( %a , %a )\n", computed.ld, computed.hi, computed.lo);
     25 			return 1;
     26 		}
     27 	}
     28 
     29 	return 0;
     30 }
     31