• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <stdint.h>
2 #include <stdio.h>
3 
4 COMPILER_RT_ABI long double __floatunditf(uint64_t);
5 
6 #include "floatunditf_test.h"
7 #include "DD.h"
8 
main(int argc,char * argv[])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 = __floatunditf(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