Changed rational comparison algorithm to avoid overflow and fix bug #798357; changed integer comparison algorithm to match