Welcome back to Estimating and Comparing Real Numbers! This is the fourth lesson out of five in the course, so you are one step away from the finish line. So far, we have built decimal approximations by trial squaring and rounded calculator displays to a target precision. Each of those skills focused on understanding a single number at a time. In this lesson, we bring everything together to tackle a broader challenge: comparing and ordering a mixed collection of rationals and irrationals, side by side, from least to greatest.
The Need for a Common Format
Converting Each Number to a Decimal
Worked Example: Ordering Four Numbers
When Extra Precision Is Needed
A Reliable Ordering Process
Conclusion and Next Steps
In this lesson, we learned how to compare and order a mixed collection of rationals and irrationals by converting every value to a common decimal approximation. The key ideas are straightforward: choose a starting precision (hundredths is usually enough), refine only when values collide, and always state the final order in the original forms. This technique works whether the numbers in question are fractions, square roots, famous constants, or plain decimals.
Up next, you will put this ordering skill to the test in a set of hands-on exercises. You will match numbers to their decimal approximations, sort a mixed set on your own, and even decide which of three travel routes is the shortest. Let's jump in and see how quickly you can line them up!
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
Imagine someone hands you the numbers 47, 3, π, and 2.9 and asks, "Which is smallest? Which is largest?" The difficulty is not that any single number is complicated. The difficulty is that they are written in different forms — a fraction, a square root, a famous constant, and a decimal. Comparing them directly is like comparing distances given in miles, kilometers, and city blocks all at once.
The solution is simple and powerful: convert every number to the same form. Since decimals are easy to line up digit by digit, a decimal approximation is the natural common ground. Once every value is expressed as a decimal rounded to the same precision, ordering becomes as straightforward as reading numbers from left to right.
Let's walk through the conversion for each type of number you might encounter in a mixed set.
Fractions. Divide the numerator by the denominator. For example, 47=1.75 exactly.
Square roots. Use a calculator or the trial-squaring method from Lesson 1. For instance, 3≈1.732.
Famous constants. As you may recall from earlier in this learning path, π≈3.1416 and e≈2.7183.
Terminating or repeating decimals. These are already in decimal form, so no conversion is needed. A number like 2.9 is ready to compare as is.
A good starting precision is hundredths (two decimal places). That level of detail resolves most comparisons without unnecessary work. If two values turn out to be very close, we can always add more digits — but hundredths is the right place to begin.
Let's order the set {47,3,π,2.9} from least to greatest. We begin by building a conversion table:
Original number
Decimal approximation
47
1.75
3
1.73
π
3.14
2.9
2.90
Now we simply read down the decimal column and sort:
1.73<1.75<2.90<3.14
Translating back to the original forms gives us the final answer:
3<47<2.9<π
Notice that 3 and 47 are only 0.02 apart in this rounding, yet the ordering is clear at the hundredths level. We state the result using the original forms of each number, not the decimal stand-ins, because the question was posed in those forms.
Sometimes two numbers round to the exact same value at the hundredths level. When that happens, we must extend our approximations by one or more decimal places to break the tie. Consider the pair 2 and 1.41.
Rounded to hundredths, both values appear identical:
2≈1.411.41=1.41
Because they appear tied, we move to the thousandths place to find the difference:
2≈1.4141.41=1.410
At thousandths the distinction is unmistakable: 2>1.41. The rule of thumb is: keep adding one decimal place until every number in the set has a distinct value. In practice, hundredths resolve most everyday comparisons, and thousandths handle nearly all remaining ties.
To keep things organized when you face a mixed set of any size, follow this five-step process:
Convert every number to a decimal approximation, rounded to the same precision (start with hundredths).
Scan the list for any values that match at that precision.
Refine only the matching values to one more decimal place.
Sort the decimals from least to greatest (or greatest to least, as the problem requires).
Rewrite the final order using the original forms of the numbers.
Let's apply this to a five-number set: {3.2,10,413,π,310}. All five numbers live between 3 and 4, so without decimal conversions these comparisons would be tough to see at a glance.
Original number
Hundredths
Thousandths (if needed)
3.2
3.20
—
10
3.16
—
413
3.25
—
π
3.14
—
310
3.33
—
Every value is already distinct at the hundredths level, so no extra precision is needed. Sorting gives:
3.14<3.16<3.20<3.25<3.33
Rewriting with original forms:
π<10<3.2<413<310
The table makes the work transparent and easy to check. Whether a set contains two numbers or ten, the same five steps apply every time.