double my_sin(double x)
{
register double ret;
__asm__ (
"fsin"
: "=t" (ret)
: "0" (x)
);
return ret;
}//计算x(弧度表示)的正弦值。
int main()
{
printf("%f/n",sin(0.5));
printf("%f/n",my_sin(0.5));
system("pause");
return 0;
}
double my_sin(double x)
{
register double ret;
__asm__ (
"fsin"
: "=t" (ret)
: "0" (x)
);
return ret;
}//计算x(弧度表示)的正弦值。
int main()
{
printf("%f/n",sin(0.5));
printf("%f/n",my_sin(0.5));
system("pause");
return 0;
}