comparison test/long.c @ 222:3d214303bae9

*** empty log message ***
author kono
date Mon, 26 Apr 2004 08:58:34 +0900
parents ce0c38b6c85e
children 8a23c20ac92d
comparison
equal deleted inserted replaced
221:ceae585186d9 222:3d214303bae9
62 k = 44; 62 k = 44;
63 k = i*j+3+k; 63 k = i*j+3+k;
64 m = i*j-7+k; 64 m = i*j-7+k;
65 printf("%lld %lld %llu\n",i,k,m); 65 printf("%lld %lld %llu\n",i,k,m);
66 printf("%lld %lld %llu\n",i,1231234234233LL,m); 66 printf("%lld %lld %llu\n",i,1231234234233LL,m);
67 printf("0x%llx 0x%llx 0x%llx\n",i,k,m);
68 printf("0x%llx 0x%llx 0x%llx\n",i,1231234234233LL,m);
67 69
68 g0 = -2343423423424234234LL; 70 g0 = -2343423423424234234LL;
69 g0++; --g0; 71 g0++; --g0;
70 ++g0; g0--; 72 ++g0; g0--;
71 printf("g0=%lld\n",g0); 73 printf("g0=%lld\n",g0);
74 printf("g0=0x%llx\n",g0);
72 g1 = -2343423423424234234LL; 75 g1 = -2343423423424234234LL;
73 g1++; --g1; 76 g1++; --g1;
74 ++g1; g1--; 77 ++g1; g1--;
75 printf("g1=%lld\n",g1); 78 printf("g1=%lld\n",g1);
79 printf("g1=0x%llx\n",g1);
76 80
77 sg0 = 2343423423424234234LL; 81 sg0 = 2343423423424234234LL;
78 sg0++; --sg0; 82 sg0++; --sg0;
79 ++sg0; sg0--; 83 ++sg0; sg0--;
80 printf("sg0=%lld\n",sg0); 84 printf("sg0=%lld\n",sg0);
130 printf("gi=%lld\n",gi); 134 printf("gi=%lld\n",gi);
131 printf("gj=%lld\n",gj); 135 printf("gj=%lld\n",gj);
132 136
133 printf("k=%lld\n",k); 137 printf("k=%lld\n",k);
134 printf("m=%lld\n",m); 138 printf("m=%lld\n",m);
139 printf("k=0x%llx\n",k);
140 printf("m=0x%llx\n",m);
135 printf("a[33]=%lld\n",a[33]); 141 printf("a[33]=%lld\n",a[33]);
136 printf("b[33]=%lld\n",b[33]); 142 printf("b[33]=%lld\n",b[33]);
137 printf("a[33]=%lld\n",++a[33]); 143 printf("a[33]=%lld\n",++a[33]);
138 printf("b[33]=%lld\n",b[33]--); 144 printf("b[33]=%lld\n",b[33]--);
139 145
155 printf("*--up = %lld\n",*--up); 161 printf("*--up = %lld\n",*--up);
156 162
157 163
158 ii = f(i,j,k,m,a[33]); 164 ii = f(i,j,k,m,a[33]);
159 printf("f()=%lld\n",ii); 165 printf("f()=%lld\n",ii);
166 printf("f()=0x%llx\n",ii);
160 ii = g(i,j,k,m,a[33]); 167 ii = g(i,j,k,m,a[33]);
161 printf("f()=%lld\n",ii); 168 printf("g()=%lld\n",ii);
169 printf("g()=0x%llx\n",ii);
162 test3(); 170 test3();
163 return 0; 171 return 0;
164 } 172 }
165 173
166 long long f(long long i,unsigned long long j,unsigned long long k,long long m,long long a) 174 long long f(long long i,unsigned long long j,unsigned long long k,long long m,long long a)