Author Topic: Polynomials All In One Math Tool Upgraded  (Read 4153 times)

0 Members and 1 Guest are viewing this topic.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Polynomials All In One Math Tool Upgraded
« 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.


+++++++++++++++++++++


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.
« Last Edit: June 06, 2015, 01:13:53 pm by ACagliano »

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Polynomials All In One Math Tool Upgraded!
« Reply #1 on: June 05, 2015, 06:48:08 pm »
This sounds pretty awesome! Any reason you used the curly brackets instead of the normal paranthesis?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Polynomials All In One Math Tool Upgraded!
« Reply #2 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.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Polynomials All In One Math Tool Upgraded!
« Reply #3 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.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Polynomials All In One Math Tool Upgraded!
« Reply #4 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 )

« Last Edit: June 06, 2015, 11:53:43 am by ACagliano »

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Polynomials All In One Math Tool Upgraded
« Reply #5 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

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Polynomials All In One Math Tool Upgraded
« Reply #6 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.