Add comparison operators

Fixes #6.
Adds operator functions that can compare values.