Hidden WordScanner
Private scans · No account required

DuckieDai Logarithm Solver

Evaluate a logarithm in any base, solve log_b(x) = y for x, or solve log_b(ax+c) = d for x, with a check of the answer.

exponential functions · MIT License

Overview

Evaluate a logarithm in any base, solve log_b(x) = y for x, or solve log_b(ax+c) = d for x, with a check of the answer.

  • Owner-tested on a TI calculator
  • Version 1.0.0
  • 2793 bytes
  • Uses math

Before you run it

  • TI-84 Plus CE Python · No calculator OS or Python App version has been verified.
  • TI Connect CE .py transfer to the Python App; the owner's transfer details were not recorded
  • Logarithms use the change of base formula log_b(x) = ln(x)/ln(b).
  • Answers are rounded to six decimal places.
  • The base must be greater than 0 and cannot equal 1; the program asks again until it is.

Try the DuckieDai calculator screen

Follow the program's prompts and result flow before downloading.

JavaScript is required for the optional browser simulation. Source viewing and downloading remain available without it.

Simulation boundary: This preview uses a reviewed browser adapter. It does not execute the downloaded Python and does not prove TI-Python or calculator compatibility.

Learn the math

How logarithms work

The idea

A logarithm answers the question: what power do I raise the base to in order to get this number? Because 2 to the power 3 is 8, the log base 2 of 8 is 3.

That makes a logarithm the inverse of an exponential. Any log equation can be rewritten as a power, and that rewrite is how you solve it.

The formula

log_b(x) = y means b^y = x

log_b(x) = ln(x)/ln(b)

b
the base: positive and not 1
x
the argument: what you take the log of, always positive
y
the logarithm, which is an exponent

Using the program

Worked example

Evaluate the log base 2 of 8. Choose 1 and enter base 2 and x = 8.

log_2(8) = ln(8)/ln(2)

The program shows log_ 2.0 ( 8.0 ) and = 3.0.

Solve log_2(3x - 1) = 5. Choose 3 and enter base 2, a = 3, c = -1, and d = 5. Rewriting gives 3x - 1 = 2^5 = 32, and the program shows x = 11.0 with the check ax+c = 32.0 and b^d = 32.0.

Tips and common mistakes

Where this comes up

Logarithms are introduced in algebra 2 and are a full unit of precalculus and college algebra. Chemistry uses them for pH, and physics and earth science use them for decibels and earthquake magnitudes.

Exact reviewed bytes

Source code

Download .py

View source below, copy it when JavaScript is available, or download the exact .py bytes.

  1. """DuckieDai Logarithm Solver for TI-84 Plus CE Python."""
  2. from math import log
  3. def intro():
  4. print("+----------------------+")
  5. print("| LOG SOLVER |")
  6. print("| |")
  7. print("| __ |")
  8. print("| ___(o )> quack! |")
  9. print("| \\ <_. ) |")
  10. print("| `---' |")
  11. print("| by DuckieDai |")
  12. print("| hiddenwordscanner.com|")
  13. print("+----------------------+")
  14. print("Loading...")
  15. input("Press enter ")
  16. print("\n"*6)
  17. def num(prompt):
  18. while True:
  19. try:
  20. return float(input(prompt))
  21. except:
  22. print("Enter a number.")
  23. def base():
  24. while True:
  25. b = num("Base b? ")
  26. if b > 0 and b != 1:
  27. return b
  28. print("Base must be")
  29. print("> 0 and not 1.")
  30. intro()
  31. while True:
  32. print("LOG SOLVER")
  33. print("1: Evaluate log")
  34. print("2: log_b(x)=y")
  35. print("3: log_b(ax+c)=d")
  36. print()
  37. mode = input("Choice? ")
  38. print("\n"*5)
  39. # -----------------
  40. # MODE 1
  41. # -----------------
  42. if mode == "1":
  43. print("Evaluate:")
  44. print("log_b(x)")
  45. print()
  46. b = base()
  47. while True:
  48. x = num("x? ")
  49. if x > 0:
  50. break
  51. print("x must be > 0")
  52. answer = log(x) / log(b)
  53. print("\n"*4)
  54. print("RESULT")
  55. print("------")
  56. print("log_", b, "(", x, ")")
  57. print("=", round(answer, 6))
  58. # -----------------
  59. # MODE 2
  60. # -----------------
  61. elif mode == "2":
  62. print("Solve:")
  63. print("log_b(x)=y")
  64. print()
  65. b = base()
  66. y = num("y? ")
  67. x = b ** y
  68. print("\n"*4)
  69. print("RESULT")
  70. print("------")
  71. print("x =", round(x, 6))
  72. print()
  73. print("Because:")
  74. print("x = b^y")
  75. # -----------------
  76. # MODE 3
  77. # -----------------
  78. elif mode == "3":
  79. print("Solve:")
  80. print("log_b(ax+c)=d")
  81. print()
  82. b = base()
  83. a = num("a? ")
  84. c = num("c? ")
  85. d = num("d? ")
  86. if a == 0:
  87. print()
  88. print("a cannot be 0.")
  89. else:
  90. inside = b ** d
  91. x = (inside - c) / a
  92. print("\n"*4)
  93. print("RESULT")
  94. print("------")
  95. print("x =", round(x, 6))
  96. print()
  97. print("Check:")
  98. print("ax+c =", round(a*x+c, 6))
  99. print("b^d =", round(inside, 6))
  100. else:
  101. print("Choose 1, 2, or 3.")
  102. print()
  103. again = input("Again? y/n: ")
  104. if again.lower() != "y":
  105. break
  106. print("\n"*7)
  107. print()
  108. print("DuckieDai says:")
  109. print("done!")
Filename
LOGSOL.py
Size
2793 bytes
SHA-256
a868e2862d2fac5ddfb6f1d003371e1f58e90b1da4863bcc7f911da555ddb1a6

Usage

Inputs

  • One menu choice from 1 to 3
  • Base b (positive and not 1)
  • The argument x, the value y, or the coefficients a, c, and d

Outputs

  • The value of log_b(x) rounded to six decimal places
  • The solution x of log_b(x) = y
  • The solution x of log_b(ax+c) = d with a check that ax+c equals b^d

Units: Pure numbers; no physical units.

Assumptions and limitations

Assumptions

  • Logarithms use the change of base formula log_b(x) = ln(x)/ln(b).
  • Answers are rounded to six decimal places.

Constraints

  • The base must be greater than 0 and cannot equal 1; the program asks again until it is.
  • When evaluating a logarithm, x must be greater than 0.
  • In log_b(ax+c) = d, a cannot be 0.

Known failures

  • A very large exponent makes b^y or b^d too large for the calculator and stops the program with an error.
  • A menu choice other than 1 to 3 shows a reminder and then asks whether to go again.

Compatibility and review

Review status
Owner-tested on a TI calculator
Tested on
Owner reports personally running this program on a TI-84 Plus CE Python calculator; the test date, OS version, and Python App version were not recorded
What happened
Owner reported pass on the calculator before the website line was added to the opening screen and the line endings were normalised. The steps after the opening screen are unchanged; this exact file has not yet been rerun on a calculator.
Dependencies
math
Suggested calculator name
LOGSOL — you can give it another valid, unique name when you transfer it
Desktop test cases
Not available for this interactive-only source

This exact source auto-launches an interactive calculator session, so compatibility evidence comes from the recorded physical-device review rather than an importable desktop fixture.

Transfer and launch

  1. Confirm that your calculator is the Python-capable model named above. This release has no verified calculator OS or Python App version; treat transfer and execution as unverified until independently tested.
  2. Download the .py source above and verify its SHA-256 digest if your computer provides that option.
  3. Use TI Connect CE to send the Python file to a compatible calculator. LOGSOL is a suggested name; you may choose another valid, unique calculator name.
  4. Open the Python App, select the program, and check sample inputs before relying on other results.

Read the complete installation, launch, troubleshooting, and removal guide.

Availability does not mean a teacher, school, or exam permits this program. Follow the applicable rules.

Version history

Any source change requires a new immutable version and digest. Historical downloads remain available only while their review records remain valid.

Independent compatibility resource: Hidden Word Scanner is independent and is not affiliated with or endorsed by Texas Instruments. TI product names describe compatibility only.

Action-count privacy: Successful downloads, preview starts, and preview completions increment same-origin aggregate counters. No entered values, source text, IP address, account, cookie, device identifier, or fingerprint is stored with these counts.