Using the full toolkit? Read the step-by-step Polynomial Toolkit guide for quartic, cubic, and quadratic workflows, worked examples, and a reminder to keep every root you find.
algebra · MIT License
Overview
Test one supplied zero of a cubic, then solve the resulting quadratic quotient when that zero is confirmed.
- Owner-tested on a TI calculator
- Version 1.0.0
- 3934 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
- Inputs represent a non-degenerate cubic and a valid numeric or p/q zero.
- The solver only continues after the supplied candidate is confirmed as a zero.
- Remainders with magnitude below 1e-7 are treated as zero.
Try the DuckieDai calculator screen
Follow the program's prompts and result flow before downloading.
TI-84 Plus CE Python · screen preview
Exact reviewed bytes
Source code
"""DuckieDai Cubic Zero Solver for TI-84 Plus CE Python."""from math import sqrtdef duckiedai_intro(program_name, wait=True):title = program_name[:16]empty = 16 - len(title)left = empty // 2right = empty - leftprint("+----------------------+")print("| " + " " * left + title + " " * right + " |")print("| |")print("| __ |")print("| ___(o )> quack! |")print("| \\ <_. ) |")print("| `---' |")print("| by DuckieDai |")print("| hiddenwordscanner.com|")print("+----------------------+")print("Loading...")if wait:input("Press enter to start ")print("\n" * 8)def clear_screen():print("\n" * 8)def clean_num(n):if abs(n - round(n)) < 0.0000001:return int(round(n))return round(n, 6)def quadratic_solver(a, b, c):disc = b * b - 4 * a * c# SCREEN 3clear_screen()print("QUADRATIC")print("---------")print(clean_num(a), "x^2")print(clean_num(b), "x")print(clean_num(c))print("")print("Discriminant:")print(clean_num(disc))input("\nPress enter ")# SCREEN 4clear_screen()print("OTHER ROOTS")print("-----------")if abs(disc) < 0.0000001:x = -b / (2 * a)print("One repeated root:")print(clean_num(x))elif disc > 0:x1 = (-b + sqrt(disc)) / (2 * a)x2 = (-b - sqrt(disc)) / (2 * a)print("x1 =", clean_num(x1))print("x2 =", clean_num(x2))print("")print("Exact form:")print(clean_num(-b), "+/-")print("sqrt(", clean_num(disc), ")")print("over", clean_num(2 * a))else:real = -b / (2 * a)imag = sqrt(-disc) / abs(2 * a)print("Complex roots:")print(clean_num(real), "+")print(clean_num(imag), "i")print("")print(clean_num(real), "-")print(clean_num(imag), "i")input("\nPress enter ")def number(prompt):text = input(prompt)if "/" in text:parts = text.split("/")return float(parts[0]) / float(parts[1])return float(text)def run_test():clear_screen()print("ENTER CUBIC")print("ax^3+bx^2+cx+d")print("")a = float(input("x^3: "))b = float(input("x^2: "))c = float(input("x: "))d = float(input("Const: "))print("")print("Test zero")print("Use decimal if frac")zero = number("Zero: ")first = asecond = b + first * zerothird = c + second * zeroremainder = d + third * zero# Fix tiny floating errorsif abs(remainder) < 0.0000001:remainder = 0# SCREEN 1clear_screen()print("ZERO TEST")print("---------")print("Test:", clean_num(zero))print("R:", clean_num(remainder))print("")if remainder == 0:print("TRUE!")print("IT IS A ZERO")else:print("FALSE")print("NOT A ZERO")input("\nPress enter ")# If false, stop hereif remainder != 0:return# SCREEN 2clear_screen()print("QUOTIENT")print("--------")print(clean_num(first), "x^2")print(clean_num(second), "x")print(clean_num(third))print("")print("Next:")print("Quadratic formula")input("\nPress enter ")# AUTOMATICALLY SOLVE QUADRATICquadratic_solver(first, second, third)# FINAL SCREENclear_screen()print("ALL ROOTS")print("---------")print("First root:")print(clean_num(zero))print("")print("Other 2 shown")print("on last screen")duckiedai_intro("Cubic Solver")while True:run_test()print("")again = input("Again? y/n: ")if again.lower() != "y":breakclear_screen()print("DuckieDai says: done!")
- Filename
synthD.py- Size
- 3934 bytes
- SHA-256
f4c36ab4cc6940021758957bcd5cb9c3e2beefa62bd56aac0fa11b74e9eb73c6
Usage
Inputs
- Numeric coefficients a, b, c, and d for ax^3 + bx^2 + cx + d
- One decimal or p/q-form proposed zero
Outputs
- True or false zero result
- Quadratic quotient
- Remaining real, repeated, or complex roots when the tested zero is true
Units: Polynomial coefficients; no physical units.
Assumptions and limitations
Assumptions
- Inputs represent a non-degenerate cubic and a valid numeric or p/q zero.
Constraints
- The solver only continues after the supplied candidate is confirmed as a zero.
- Remainders with magnitude below 1e-7 are treated as zero.
Known failures
- Malformed fractions and zero denominators use the calculator Python input error path.
- A zero leading coefficient can create invalid quadratic-formula arithmetic.
Compatibility and review
- Review status
- Owner-tested on a TI calculator
- Tested on
- Owner reports personally testing 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. The published file is the owner's tested source.
- Dependencies
- math
- Suggested calculator name
SYNTHD— 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
- 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.
- Download the
.pysource above and verify its SHA-256 digest if your computer provides that option. - Use TI Connect CE to send the Python file to a compatible calculator.
SYNTHDis a suggested name; you may choose another valid, unique calculator name. - 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
- 1.0.0 — current version, published . Download this reviewed version
Any source change requires a new immutable version and digest. Historical downloads remain available only while their review records remain valid.
Related learning
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.