Sample math in C with Python wrapper.