[求助]这个程序怎么用汇编实现?
各位高手、斑竹请把下面的C程序改成汇编,小弟在此谢谢大家了!万分感谢!
double tanh(double x)
{
float a;
float b;
float c;
double y;
if (x > 20)
return 1;
else if (x < -20)
return -1;
else
{
a = expf(x);
b = expf(-x);
c=(a-b)/(a+b);
y=(double)c;
return y;
}
}
void calcOverallError()
{
int i;
RMSerror = 0.0;
for(i = 0;i<numPatterns;i++)
{
patNum = i;
calcNet();
RMSerror = RMSerror + (errThisPat * errThisPat);
}
RMSerror = RMSerror/numPatterns;
RMSerror = sqrt(RMSerror);
}