Author Topic: [Axe] Small CAS program  (Read 4228 times)

0 Members and 1 Guest are viewing this topic.

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
[Axe] Small CAS program
« on: September 24, 2014, 09:30:04 am »

I was browsing files on my computer, and I suddenly saw a big project I worked on during one year...
I immediately thought "I have to share it on Omnimaga", so here it is. A small CAS program.

It's the biggest TI project I made. This "small CAS program" is small for two reasons :
It takes only 5555 bytes, and... it only supports a few operations (see below).

Note that this project could be improved : there are many optimizations to do (it could become two times faster), and some important things to add (see below). Nevertheless, I WON'T improve it. I spent so much time on thinking of algorithms, programming them, and debugging, and I don't want to spend days on it again. Additionally, the important changes to do would require to rewrite the program entirely. I therefore consider this program is finished. I made it in Axe, but I won't publish its source code, mostly because it's unreadable.


   Features :

* Download here !
* It respects the priority of operations (parenthesis are allowed)
* You can only use one unknown, which must be X.
* You can also use floating point numbers, or integers.
* Writes up to 11 digits (whereas the OS only shows 9 digits)
* Operations allowed :
  (+) additions
  (-) subtractions
  (*) multiplications
  (^) powers (of natural numbers only)
  (E) powers of 10
  (') derivatives


   Examples :

When the program is executed, it displays ":".
The user can then type the input, which will be computed.
The result is displayed on a new line, starting with the character "=".


A basic calculation to check the priority of operations.
I hope you already knew how to compute it by hand.

Another easy calculation to try the distributivity, and to see that
floats without integer part can be written without the null unit.

If you are at high school, then you should now this remarkable identity...

...but you might not know this one.

The magical effect of the derivative.

It's possible to nest parenthesis.
The result was predictable, wasn't int ?


   Limits :

* It only expands expressions
* You CAN'T use division or square root
* You CAN'T use any variable except X
* You CAN't use the constants pi or e
* Close parenthesis otherwise it'll crash
* Slower than the OS : don't use it when it's not needed
* Uses the lists LTMP1 to LTMP6 and LTEMP for computation
* Powers of X bigger than 6 are ignored (try for example (X+1)^7).


   Disclaimer :

I'm not responsible for anything, but don't worry, there's no bug known.
If you don't write incorrect instructions, it shouldn't freeze or clear the RAM.
« Last Edit: September 24, 2014, 11:18:17 am by Zemmargorp »
I'm french, that's the reason why my English can be a bit approximate.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Axe] Small CAS program
« Reply #1 on: September 25, 2014, 10:46:55 pm »
Writing a full CAS would definitively be a nightmarish job to do, although you could perhaps make it interact with Symbolic and PrettyPrint to save some work. Currently you can have a 84+ CAS by combining Symbolic+PrettyPrint+Autocalc, but I think it still misses a few features plus since AutoCalc is written in BASIC, it's pretty slow to do some operations.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: [Axe] Small CAS program
« Reply #2 on: September 26, 2014, 09:42:14 am »
It sounds like a really cool project, but why not release the source? If you don't share the source of course it'll be unreadable ;)

Either way it looks like you got quite a lot done already, even if you don't plan on continuing it thanks for sharing.

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
Re: [Axe] Small CAS program
« Reply #3 on: September 26, 2014, 01:04:44 pm »
Writing a full CAS would definitively be a nightmarish job to do, although you could perhaps make it interact with Symbolic and PrettyPrint to save some work. Currently you can have a 84+ CAS by combining Symbolic+PrettyPrint+Autocalc, but I think it still misses a few features plus since AutoCalc is written in BASIC, it's pretty slow to do some operations.
Yes, and I won't try to write a full CAS ! But as you said, Symbolic and PrettyPrint are for 84+ only, aren't they ? I only own a 83+  :-\... I can still put ZoomMath in it, but it takes all the ARC !

It sounds like a really cool project, but why not release the source? If you don't share the source of course it'll be unreadable ;)

Either way it looks like you got quite a lot done already, even if you don't plan on continuing it thanks for sharing.
Thank you  :) ! This program helped me sometimes, so I wanted to share it.

Nevertheless, I don't want to release the source because it's really unreadable (there are bits of ASM in it, I only used variables from A to Z, etc.), and moreover, the way I wrote the program prevents it from being improved. If you want to add divisions to it, for example, you'd have to restart from Scratch, because this program is not compatible with this kind of operations. Same thing for square roots.
If anyone wants to make a better CAS program, it wouldn't be a good idea to start from this one : there'd be a lot of modifications and debugging to do, it'd be a real nightmare, and above all, this person don't know how my program works (and this program works in a really strange way, it's not a good example). It'd be better to start from scratch, to avoid these problems and also to discover how to create CAS program, because this is important too.
I'm french, that's the reason why my English can be a bit approximate.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Axe] Small CAS program
« Reply #4 on: September 27, 2014, 10:32:50 am »
Symbolic and PrettyPrint works pretty well on a 83+, as they were made before the 84+ even existed.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
Re: [Axe] Small CAS program
« Reply #5 on: October 11, 2014, 11:21:06 am »
Symbolic and PrettyPrint works pretty well on a 83+, as they were made before the 84+ even existed.
I've tried them, and they are great apps, but they require a bit more than 5555 bytes !
I'm french, that's the reason why my English can be a bit approximate.

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
Re: [Axe] Small CAS program
« Reply #6 on: October 13, 2014, 01:31:05 pm »
6 downloads so far ! That's quite good ! I'm happy people download it (by the way, they probably like this too, and thanks to ClrDraw for his +1), because I spent so much time working on this ! When I think I first made it in TI-Basic because I didn't know how to use floating numbers in Axe, and then I decided to make it in Axe to make it faster and learned some assembly commands for the OS's floats...
I'm french, that's the reason why my English can be a bit approximate.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Axe] Small CAS program
« Reply #7 on: October 14, 2014, 12:14:32 pm »
Honestly, it would get even more downloads if you also put a copy on ticalc.org, but of course people there usually don't bother reading readmes so they would give bad rating because of missing stuff even though it's because the program is not 100% finished. The TI-Boy SE rating score back before it started supporting newer calcs speaks by itself. If you put it there, though, you could always put a link to this topic in the readme if you want more feedback here. :)
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline pimathbrainiac

  • Occasionally I make projects
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: [Axe] Small CAS program
« Reply #8 on: October 14, 2014, 12:54:11 pm »
+1 and download
'nuff said.
I am Bach.

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
Re: [Axe] Small CAS program
« Reply #9 on: October 16, 2014, 01:12:32 pm »
+1 and download
'nuff said.
Well, thank you very much !
I hope this program will be useful for you.
I'm french, that's the reason why my English can be a bit approximate.