FFT NTT 错误总结(持续更新)

FFT NTT错误总结

1 处理\(r\)数组时忘记赋值

r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));

2 负数重载运算符

point operator * (point a,point b){
	return point(a.x * b.x - a.y * b.y,a.x * b.y + a.y * b.x);
}

3 欧拉公式记不清楚

point Wn = point(cos(Pi / mid),type * sin(Pi / mid));

4 蝴蝶操作忘记*w

point x = A[j + k],y = w * A[j + mid + k]
posted @ 2019-03-31 08:07  wyxdrqcccc  阅读(226)  评论(0编辑  收藏  举报