Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: ACagliano on June 05, 2015, 06:46:07 pm

Title: Polynomials All In One Math Tool Upgraded
Post by: ACagliano on June 05, 2015, 06:46:07 pm
A while back I wanted to upgrade my Polynomials All-In-One program which added, subtracted, multiplied, and divided polynomials. It also could do derivative, integral, and zeroes. I hoped to allow it to auto-order of operations parse. I still could not implement an efficient order of operations parser, so I settled for the next best.

You type a list of operators, followed by a colon, followed by a bracket-enclosed list of polynomials (I could change the brackets to parenthases if people prefer it). For example, to do:
Code: [Select]
(3x^2 - 7x +2) - (4x - 4) * (x^2 + 4x - 1)you would type at the prompt:
Code: [Select]
-*:{3x^2-7x+2}{4x-4}{x^2+4x-1}
Additionally, the letters D, I, and Z (and their lowercase counterparts) will add derivative, integral, and zeroes to the computation queue. Zeroes simply displays the zeroes, but doesn't affect the prior value, allowing the queue to resume after doing zeroes as normal.

Here's two screenshots of the program doing a few simple operations. Anyone who wants to beta test it can download it here.

(http://clrhome.org/polyaio/polyaio2.gif)
+++++++++++++++++++++
(http://clrhome.org/polyaio/polyaio2-s2.gif)

BUGS I KNOW OF: Dividing with a 1-term denominator gives a Domain error on the deltaList line; Doing a derivative or integral as the first and only argument gives a domain error due to the string->list conversion (now resolved but not in the beta uploaded)

Also, the program currently discards any remainders from division. If someone can advise me on how to use it, I'll try to.
Title: Re: Polynomials All In One Math Tool Upgraded!
Post by: Sorunome on June 05, 2015, 06:48:08 pm
This sounds pretty awesome! Any reason you used the curly brackets instead of the normal paranthesis?
Title: Re: Polynomials All In One Math Tool Upgraded!
Post by: ACagliano on June 05, 2015, 07:09:40 pm
This sounds pretty awesome! Any reason you used the curly brackets instead of the normal paranthesis?

That has since been amended.
Title: Re: Polynomials All In One Math Tool Upgraded!
Post by: ACagliano on June 05, 2015, 09:11:32 pm
Update:

New version provides bug fixes in the derivative, integral, zeroes algorithms. It also improves on memory cleaning after some of the routines use significant memory.
Title: Re: Polynomials All In One Math Tool Upgraded!
Post by: ACagliano on June 06, 2015, 11:35:27 am
•   2.0 RC1 – Division bug resolved. Error catching for divide by zero added. Trailing parenthesis removed where possible. Zeroes algorithm improved. Older version used the solve() built in command. This version uses a modified rational zeroes test ( x = p/q )

Title: Re: Polynomials All In One Math Tool Upgraded
Post by: ACagliano on June 10, 2015, 09:53:35 am
Here's the final official release:

Polynomials All In One v2.1

Input by two-part string, operators first, then operand.
Use characters D, I, and Z for derivative, integral, and zeroes, respectively.
Use the character W at the very beginning of the string to activate "show work".
Please review the documentation included.

Screenshots
(http://www.cemetech.net/img/ss/002535.gif)(http://www.cemetech.net/img/ss/002536.gif)
(http://www.cemetech.net/img/ss/002537.gif)(http://www.cemetech.net/img/ss/002538.gif)
Title: Re: Polynomials All In One Math Tool Upgraded
Post by: ACagliano on July 11, 2015, 08:33:15 pm
New update/bug fix. Division algorithm improved and streamlined and debugged. No longer says divide by zero for everything.