Greater than and difference implementation for comparison