版本比较
多项式初等函数详解
正文
增加 3 行删除 1 行
331 行未改动全部展开33233333433533633633733833934019 行未改动36036136236336436536636736836985 行未改动331 行未改动全部展开\end{aligned}$$根据上式直接计算即可。$ (\tan f(x) = \frac{\sin f(x)}{\cos f(x)})$
运用NTT时,若取 $ p=998344353 $,则一般取 $ \mathrm i=86583718 $。运用NTT时,若取 $ p=998244353 $,则一般取 $ \mathrm i=86583718 $。
时间复杂度:$ O(n \log n) $。
:::info[实现代码]19 行未改动}```$ type=0 $ 表示 $ \sin f(x) $,$ type=1 $ 表示 $ \cos f(x) $。```for(int i=0;i<n;i++) f[i]=(1ll*f[i]*img)%mod;if(type==0){ poly_exp(f,n,q); poly_times(f,-1,n,f);85 行未改动