|
[code:1]#include<stdio.h>
double recip(int denom)
{
return 1.0/(double) denom;
}
void do_nothing(){}
void test1(int denom)
{
double r1,r2;
int t1,t2;
r1=recip(denom);
r2=recip(denom);
t1=r1==r2;
do_nothing();
t2=r1==r2;
printf("%f %f------->%d\n",r1,r2,t1);
printf("%f %f------->%d\n",r1,r2,t2);
}
int main()
{
test1(10);
}
用 -O2 参数 编译看看[/code:1] |
|