So easy to shoot yourself in the foot right now. Things like "the number of terms is one more than the order of the polynomial" and requiring you pass in preallocated pointers knowing this information. This ties in with the prolate spheroid code, which leans on a a single large internal array with magic meanings for various elements.