implement coercion from number to rational