Hidden WordScanner
Private scans · No account required

DuckieDai Log and Exponent Solver

Solve logarithm and exponential equations for the exponent, the argument, or the base, solve log_b(ax+c) = d and b^x = y, and convert between log and exponential form.

exponential functions · MIT License

Overview

Solve logarithm and exponential equations for the exponent, the argument, or the base, solve log_b(ax+c) = d and b^x = y, and convert between log and exponential form.

  • Owner-tested on a TI calculator
  • Version 1.0.0
  • 5609 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(A) = ln(A)/ln(b).
  • An answer within a hundred-millionth of a fraction with denominator up to 100 is shown as that fraction; other answers are rounded to eight decimal places.
  • A base must be greater than 0 and cannot equal 1.

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 to solve logarithm and exponential equations

The idea

An exponential statement and a logarithm statement are two ways of writing the same fact. 2^3 = 8 and log_2(8) = 3 say exactly the same thing.

Every equation this program handles has three parts: a base, an exponent, and a result. Give it any two and it finds the third.

The formula

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

x = ln(A)/ln(b) A = b^x b = A^(1/x)

b
the base: positive and not 1
A
the argument of the log, which is the result of the power
x
the exponent, which is the value of the log

Using the program

Worked example

Solve 9^x = 3. Choose 5 and enter base 9 and result 3.

x = ln(3)/ln(9)

The program shows x = 1/2, with the log form log_ 9 and ( 3 ) = 1/2. That is correct because the square root of 9 is 3.

Find the base in log_x(8) = 3. Choose 3 and enter argument 8 and exponent 3. The program shows x = 2, because x^ 3 = 8.

To convert log_2(8) = 3 to exponential form, choose 6, then 1, and type 2, 8, and 3. The program shows EXP FORM: 8=2^3.

Tips and common mistakes

Where this comes up

It covers the exponential and logarithmic equations unit of algebra 2, precalculus, and college algebra, where switching between the two forms is the main skill being tested.

Exact reviewed bytes

Source code

Download .py

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

  1. """DuckieDai Log/Exponent Solver
  2. for TI-84 Plus CE Python.
  3. """
  4. from math import log
  5. def intro():
  6. print("LOG EXP SOLVER")
  7. print()
  8. print(" __")
  9. print(" ___(o )> quack!")
  10. print(" \\ <_. )")
  11. print(" `---'")
  12. print(" by DuckieDai")
  13. print()
  14. print("hiddenwordscanner.com")
  15. print("Loading...")
  16. input("Press enter ")
  17. print("\n"*6)
  18. def num(prompt):
  19. while True:
  20. try:
  21. s=input(prompt).strip()
  22. if "/" in s:
  23. a,b=s.split("/")
  24. return float(a)/float(b)
  25. return float(s)
  26. except Exception:
  27. print("Enter a number.")
  28. def fmt(x):
  29. # Whole number
  30. if abs(x-round(x)) < 1e-9:
  31. return str(int(round(x)))
  32. # Look for a simple fraction
  33. for d in range(2,101):
  34. n=round(x*d)
  35. if abs(x-n/d) < 1e-8:
  36. return str(n)+"/"+str(d)
  37. # Otherwise keep decimal
  38. return str(round(x,8))
  39. def goodbase(b):
  40. return b > 0 and b != 1
  41. intro()
  42. while True:
  43. print("LOG / EXP SOLVER")
  44. print("1 log_b(A)=x")
  45. print("2 log_b(x)=y")
  46. print("3 log_x(A)=y")
  47. print("4 log_b(ax+c)=d")
  48. print("5 b^x=y")
  49. print("6 Convert forms")
  50. print()
  51. ch=input("Choice? ")
  52. print("\n"*6)
  53. # -------------------------
  54. # 1. FIND LOG / EXPONENT
  55. # log_b(A) = x
  56. # -------------------------
  57. if ch=="1":
  58. print("log_b(A) = x")
  59. print("Find x")
  60. print()
  61. b=num("Base b? ")
  62. A=num("Argument A? ")
  63. if not goodbase(b):
  64. print("Bad base.")
  65. print("b>0 and b!=1")
  66. elif A<=0:
  67. print("Argument > 0")
  68. else:
  69. x=log(A)/log(b)
  70. print("\n"*4)
  71. print("RESULT")
  72. print("x =",fmt(x))
  73. print()
  74. print("Means:")
  75. print(fmt(b),"^",fmt(x))
  76. print("=",fmt(A))
  77. # -------------------------
  78. # 2. FIND ARGUMENT
  79. # log_b(x) = y
  80. # -------------------------
  81. elif ch=="2":
  82. print("log_b(x) = y")
  83. print("Find x")
  84. print()
  85. b=num("Base b? ")
  86. y=num("y? ")
  87. if not goodbase(b):
  88. print("Bad base.")
  89. print("b>0 and b!=1")
  90. else:
  91. x=b**y
  92. print("\n"*4)
  93. print("RESULT")
  94. print("x =",fmt(x))
  95. print()
  96. print("Because:")
  97. print("x = b^y")
  98. # -------------------------
  99. # 3. FIND BASE
  100. # log_x(A) = y
  101. # -------------------------
  102. elif ch=="3":
  103. print("log_x(A) = y")
  104. print("Find base x")
  105. print()
  106. A=num("Argument A? ")
  107. y=num("Exponent y? ")
  108. if A<=0:
  109. print("Argument > 0")
  110. elif y==0:
  111. print("No valid base")
  112. print("for y = 0")
  113. else:
  114. x=A**(1/y)
  115. print("\n"*4)
  116. if goodbase(x):
  117. print("RESULT")
  118. print("x =",fmt(x))
  119. print()
  120. print("Because:")
  121. print("x^",fmt(y),"=",fmt(A))
  122. else:
  123. print("No valid")
  124. print("log base.")
  125. # -------------------------
  126. # 4. SOLVE ARGUMENT
  127. # log_b(ax+c) = d
  128. # -------------------------
  129. elif ch=="4":
  130. print("log_b(ax+c)=d")
  131. print("Find x")
  132. print()
  133. b=num("Base b? ")
  134. a=num("a? ")
  135. c=num("c? ")
  136. d=num("d? ")
  137. if not goodbase(b):
  138. print("Bad base.")
  139. elif a==0:
  140. print("a cannot be 0")
  141. else:
  142. value=b**d
  143. x=(value-c)/a
  144. print("\n"*4)
  145. print("RESULT")
  146. print("x =",fmt(x))
  147. print()
  148. print("Step:")
  149. print("ax+c =",fmt(value))
  150. # -------------------------
  151. # 5. EXPONENTIAL
  152. # b^x = y
  153. # -------------------------
  154. elif ch=="5":
  155. print("b^x = y")
  156. print("Find x")
  157. print()
  158. b=num("Base b? ")
  159. y=num("Result y? ")
  160. if not goodbase(b):
  161. print("Bad base.")
  162. elif y<=0:
  163. print("y must be > 0")
  164. else:
  165. x=log(y)/log(b)
  166. print("\n"*4)
  167. print("RESULT")
  168. print("x =",fmt(x))
  169. print()
  170. print("Log form:")
  171. print("log_",fmt(b))
  172. print("(",fmt(y),") =",fmt(x))
  173. # -------------------------
  174. # 6. FORM CONVERTER
  175. # -------------------------
  176. elif ch=="6":
  177. print("FORM CONVERTER")
  178. print()
  179. print("1 Log -> Exp")
  180. print("2 Exp -> Log")
  181. print()
  182. form=input("Choice? ")
  183. print("\n"*5)
  184. if form=="1":
  185. print("log_b(A)=x")
  186. print()
  187. b=input("Base b? ")
  188. A=input("Argument A? ")
  189. x=input("Answer x? ")
  190. print("\n"*4)
  191. print("EXP FORM:")
  192. print(A+"="+b+"^"+x)
  193. elif form=="2":
  194. print("b^x=A")
  195. print()
  196. b=input("Base b? ")
  197. x=input("Exponent x? ")
  198. A=input("Result A? ")
  199. print("\n"*4)
  200. print("LOG FORM:")
  201. print("log_"+b+"("+A+")")
  202. print("="+x)
  203. else:
  204. print("Choose 1 or 2.")
  205. else:
  206. print("Choose 1-6.")
  207. print()
  208. again=input("Again? y/n: ")
  209. if again.lower()!="y":
  210. break
  211. print("\n"*7)
  212. print()
  213. print("DuckieDai says: done!")
  214. print("hiddenwordscanner.com")
Filename
LOGEXS.py
Size
5609 bytes
SHA-256
435ecbbf8163d02910c5c07baf5c8bfd3d45cd3b8048c9af2a26a14e27406d41

Usage

Inputs

  • One menu choice from 1 to 6
  • The base, argument, exponent, or coefficients for the chosen equation
  • For the form converter, the three parts of the equation as typed text

Outputs

  • The missing exponent, argument, or base, shown as a whole number or simple fraction when possible
  • The equivalent exponential or logarithmic statement
  • The same equation rewritten in the other form

Units: Pure numbers; no physical units.

Assumptions and limitations

Assumptions

  • Logarithms use the change of base formula log_b(A) = ln(A)/ln(b).
  • An answer within a hundred-millionth of a fraction with denominator up to 100 is shown as that fraction; other answers are rounded to eight decimal places.

Constraints

  • A base must be greater than 0 and cannot equal 1.
  • A logarithm's argument must be greater than 0.
  • Numbers may be typed as decimals or as a fraction such as 1/2.

Known failures

  • A very large exponent makes a power too large for the calculator and stops the program with an error.
  • Finding a base when the exponent is 0 has no valid answer and is reported as such.
  • The form converter rewrites whatever text is typed and does not check that the equation is true.

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. Only the line endings were normalised for publication; the program text is unchanged. This exact file has not yet been rerun on a calculator.
Dependencies
math
Suggested calculator name
LOGEXS — 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. LOGEXS 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.