下面数据的第二列temp数值有正有负,但是下面的符号函数运算却又出现了问题,得出的za_f都是负值,请问大家是什么问题呢??拜托各位高手啦!!
temp=p->ia_esti-p->ialpha;
if(temp>0)
p->za_f=p->k;//p->k是一个参数,值为100
else if(temp==0)
p->za_f=0;
else
p->za_f=-p->k;
数据表:
1,23354,3456
2,25483,3618
3,28057,3888
4,30522,4212
5,32678,4428
6,-30101,4860
7,-26346,5238
8,-22379,5670
9,-18049,6156
10,-13900,6534
11,-11162,6750
12,-8890,7074
13,-6899,7290
14,-4784,7452
15,-2884,7668
16,-1479,7776
17,-1090,7776
18,-1891,7668
19,-3194,7452
20,-5187,7182
21,-7280,6912
22,-9527,6750
23,-11760,6480
24,-14323,6102
25,-17681,5778
26,-21135,5400
27,-24609,4968
28,-28374,4536
29,-31717,4212
30,31642,3996
31,29673,3834
32,27696,3564
33,25863,3402
34,24015,3240
35,22062,3024 |