I'm working on a simple CAS and I have run into the issue of number representation, or more specifically, number comparison.
while programming with integers, the CPU compares them by checking if their bits have the same values and the same order.
Now given these integers, you can create a data structure (a number representation), such as a fraction, and ensure that each possible value that it can represent will only ever be represented in one way. For a fraction, we do this by removing all factors shared by the numerator and the denominator. This means that we can just compare each element of the fraction individually, and we never need to worry about accidentally comparing 12/4 with 3/1.
We also have the ability, however, to do the simplification at the time of the comparison. Again with the fraction example, we can also find the common denominator of the two and scale them so that we can compare them (or something like that).
Now how can we create some sort of list-based data structure (or rather number notation) that allows us to compare algebraic numbers with either of these methods? This might be asking too much because this is all under the assumption that we will still be able to perform operations.