Author Topic: A symbolic library for the Nspire non-CAS  (Read 20263 times)

0 Members and 1 Guest are viewing this topic.

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: A symbolic library for the Nspire non-CAS
« Reply #30 on: May 02, 2010, 09:25:37 pm »
Look in the algebraic simplifier. I remember it was terribly unoptimized.

Offline theUnnamed

  • LV3 Member (Next: 100)
  • ***
  • Posts: 63
  • Rating: +3/-3
    • View Profile
Re: A symbolic library for the Nspire non-CAS
« Reply #31 on: May 02, 2010, 10:38:41 pm »
I'ce been playing with it but I don't understand the structure of your tree if you remember how the trees work that would be a big help because I have not been able to make heads or tails out of the out put of pf2tree() if you could explain what the 2 numbers preceding each token mean it would be greatly appreciated. Because not understanding that has been my biggest problem and has caused me to think about rewriting the whole simplifier from scratch something I was not looking foward to. I do realize that you may not remember though cause this Library is huge and I don't think i have even lookedat half of it yet.

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: A symbolic library for the Nspire non-CAS
« Reply #32 on: May 02, 2010, 10:46:23 pm »
The trees are stored as lists, with the root being the first element of the list, and the lengths of the lists representing left and right subtrees being the two numbers following it.

Offline theUnnamed

  • LV3 Member (Next: 100)
  • ***
  • Posts: 63
  • Rating: +3/-3
    • View Profile
Re: A symbolic library for the Nspire non-CAS
« Reply #33 on: May 04, 2010, 10:43:48 am »
I thank you for your help and support in my endeavors in optimizing this library.  This is nothing against your code or your talent but I think I'm going to replace your entire algebraic simplification with one of my own design. This is not because I think your design is poor it is just that I have my own simplifier halfway finished from before I started work on your library so I think that it will be easier for me to finish my simplifier then it will be for me to optimize yours because I understand mine better. :D additionally I don't want all the time I spent designing my CAS structure to go to waste although I do think I will be using your postfix notation generator because it make building my rather complicated structure far easier.

In other news what does libexpr\collect() do? And how often do you factor numbers outside of the algebraic simplifier because I was wondering if it would be worth my time to replace my\factorsmatrix() with my own version that I don't currently have typed up but is faster and deals with fractions by expressing the denominator as primes to negative exponents but is about twice the size (needed it for my own polynomial tools and wrote it totally independently of ti

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: A symbolic library for the Nspire non-CAS
« Reply #34 on: May 04, 2010, 11:17:36 am »
You don't need to re-code the factoring function; the library is not going to factor anything bigger, than, say 10.
I think libexpr\collect() collects terms in an expression specified by a matrix, but I could be wrong (its been 6 months since I've looked at the code).