//pow函数比较不稳定,可以用自定义的pown函数进行计算; //http://acm.pku.edu.cn/JudgeOnline/problem?id=3199 #include<stdio.h> #include<math.h> __int64 pown(__int64 base,__int64 n) { if(n==0)return1; if(n==1)return base; if(n%2==0)return pown(base*base,n/2); elsereturn ...
time: 31ms test pow(a[i], 2.0) time: 2828ms 所以下次遇到类似情况不再用pow函数了……
}abs_pow34_v(L34, sce0->coeffs+start+w2*128, sce0->ics.swb_sizes[g]);abs_pow34_v(R34, sce1->coeffs+start+w2*128, sce0->ics.swb_sizes[g]);abs_pow34_v(M34, M, sce0->ics.swb_sizes[g]);abs_pow34_v(S34, S, sce0->ics.swb_sizes[g]); dist1 += quantize_band_cost...