Operations on fractions with variables