math: add some special case tests