036Mathematics · Indices and logarithms

Comparing Huge Powers

Comparing Huge Powers

Find the largest or smallest of several huge powers with logarithms, handling signs and near ties.

  • 200 bytes
  • COMP mode
01

Worked examples

Example 1

Four coding schemes can represent the following numbers of different strings. Which scheme can represent the most strings? Number the options A, B, C, D as terms 1, 2, 3, 4.

  1. A.2⁴⁸⁰
  2. B.3³⁰⁰
  3. C.4²³⁰
  4. D.5²⁰⁰
Answer
A 2⁴⁸⁰ (term 1)
Standard solution (without a calculator)
  1. All positive: every base is positive, so every term is positive, and log₁₀ is increasing on positive numbers — compare the logarithms.
  2. Logarithms: L₁ = 480 log₁₀ 2 ≈ 144.4943979; L₂ = 300 log₁₀ 3 ≈ 143.1363764; L₃ = 230 log₁₀ 4 ≈ 138.4737980; L₄ = 200 log₁₀ 5 ≈ 139.7940009.
  3. Order: L₃ < L₄ < L₂ < L₁, so 4²³⁰ < 5²⁰⁰ < 3³⁰⁰ < 2⁴⁸⁰. Term 1 is the largest: the answer is A. All four exceed 10¹⁰⁰, so the powers themselves are never needed.
Do it on the calculator

Example 2

A model produces three real numbers P = (−6)²⁰³, Q = 4⁻²⁵⁰ and R = (−5)²⁴⁰, numbered as terms 1, 2, 3. State the sign of each and find the smallest.

Answer
P is negative; Q and R are positive. The smallest is term 1, P = (−6)²⁰³.
Standard solution (without a calculator)
  1. Signs first: 203 is odd, so P < 0; 240 is even, so R = 5²⁴⁰ > 0; Q = 1/4²⁵⁰ > 0 — a negative exponent does not make a negative number.
  2. Smallest by sign: every negative number is smaller than every positive one, so P is the smallest; also 0 < Q < 1 < R, so P < Q < R.
  3. Logarithms as a check: log₁₀|P| = 203 log₁₀ 6 ≈ 157.9647038; log₁₀|Q| = −250 log₁₀ 4 ≈ −150.5149978; log₁₀|R| = 240 log₁₀ 5 ≈ 167.7528010. Q has the smallest logarithm, but the smallest number is the negative P: logarithms cannot be compared across signs. Use M = −3.
Do it on the calculator

Example 3

The exact factors U = 2¹⁰⁰ and V = 4^50.00000001 are terms 1 and 2. Compare them, and explain the term number 0 that the program gives when asked for the larger one.

Answer
V > U. The program’s 0 means the numerical comparison is pending, not that the numbers are equal.
Standard solution (without a calculator)
  1. Exact algebra first: V = (2²)^50.00000001 = 2^100.00000002. The base 2 > 1 and 100.00000002 > 100, so V > U.
  2. Difference of logarithms: L_U = 100 log₁₀ 2 ≈ 30.1029995664 and L_V = 100.00000002 log₁₀ 2 ≈ 30.1029995724, about 6.02 × 10⁻⁹ apart.
  3. Reading the program: the pending threshold here is about 10⁻⁹(2 + L_U + L_V) ≈ 6.22 × 10⁻⁸, larger than the difference, so the program shows the term number 0. Both logarithms show as 30.10299957: the display cannot separate them, and the algebra above decides that term 2 is larger.
Do it on the calculator
02

When to use it

DSE indices and logarithms questions ask, for example, which of 2⁴⁸⁰, 3³⁰⁰, 4²³⁰ and 5²⁰⁰ is the largest — numbers far beyond the calculator’s range. Since log₁₀ is increasing on positive numbers, comparing b·log₁₀|a| decides the order without computing the powers. 036 takes the number of terms M (positive for the largest, negative for the smallest), then each term’s base, exponent and sign; it shows each term’s log₁₀|value| and finally the number of the extreme term and its logarithm. A term number of 0 means “too close to decide”, never a tie or a proven extreme.

What it is for

  • Several non-zero real powers aᵇ, numbered in input order
  • The largest term (M > 0) or the smallest term (M < 0)
  • Negative bases with whole-number exponents, negative exponents and an extra minus sign

What you enter

  • M: ± the number of terms (4 for the largest of four, −4 for the smallest)
  • For each term: A = base, B = exponent
  • C?: the sign is already filled in — press EXE; enter −C only for an extra minus sign

What it shows

  • log₁₀ |value| of each term, one screen per term
  • The number of the extreme term — 0 means pending
  • The logarithm of that (nominal) best term

Check before use

  • M must be a non-zero whole number; |M| is the number of terms. 0 is rejected, but a fraction such as 2.5 is not checked — do not enter one.
  • Enter only the base and the exponent, never aᵇ itself. Enter new values for A and B every time; only C? may take a blank EXE to accept the pre-filled sign. C must end as 1 or −1, otherwise Math ERROR is shown.
  • A negative base needs a whole-number exponent (checked up to |b| ≤ 10⁹). A positive base may have any valid real exponent (tested up to b = 10⁹⁰), within the range below.
  • Only non-zero real powers: no zero base (0⁰ or negative powers of 0), no complex numbers, and no sums such as 2¹⁰ + 1 entered as one power. Zero can be placed by hand: negative < 0 < positive.
  • For an extra minus sign in front of a power, such as −2¹⁰⁰ or −(−3)¹⁰¹, enter −C at C?; this flips the automatic sign once.
  • Bases, exponents and the inputs must be representable in COMP, and each term needs |b·log₁₀|a|| ≤ 10⁹⁸ so that the comparison arithmetic stays in range. This is not unlimited precision.
  • 0 is the pending code — not term 0, and not a proof of equality. When the logarithms are very close, decide by algebra (same base, same exponent, exact fractions) or with high precision; the final logarithm belongs only to the nominal candidate.
  • Inputs are first evaluated at the calculator’s precision. A base extremely close to 1 with a huge exponent may lose the deciding digits before the program starts; decide such cases by algebra.
  • Run in COMP (the example uses P1); the angle unit does not matter. Fix 0 is used briefly for the parity test and Norm 1 is restored before anything is shown. A, B, C, D, X, Y and M are overwritten

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.

Checking access…

Sign in to unlock the full programme

Checking access…

The programme code and appendix unlock together.