Stress tests passed for i=0, i=pi

This should be sufficient for use in Android

Merge this with master, and then try to fix other i cases