Ensure operations only involve positive numbers

Reviewers: eater

Reviewed By: eater

Differential Revision: http://phabricator.khanacademy.org/D7848