MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / log

Method log

Math/Subset Sum Problem.cpp:218–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216 return ans.mod_xk(n);
217 }
218 poly log(int n) const { //ln p(x) mod x^n
219 assert(a[0] == 1);
220 return (differentiate().mod_xk(n) * inverse(n)).integrate().mod_xk(n);
221 }
222 poly exp(int n) const { //e ^ p(x) mod x^n
223 if(is_zero()) return {1};
224 assert(a[0] == 0);

Callers 1

expMethod · 0.45

Calls 3

inverseFunction · 0.70
mod_xkMethod · 0.45
integrateMethod · 0.45

Tested by

no test coverage detected