Author Topic: z80 CAS ideas  (Read 4357 times)

0 Members and 1 Guest are viewing this topic.

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
z80 CAS ideas
« on: August 15, 2011, 10:26:10 pm »
Hello,

I'm kind of thinking about doing this ^, making a complete CAS for the Ti-83/84+(se) family (written in Axe). However I'm currently working on something else, but this is still something fun/interesting to talk about, for the future and whatnot.

A list of lots of math functions can be found at http://functions.wolfram.com/ , and from there we can narrow it down to probably about 50-100 (the site has something like 300,000+ functions submitted).

Anyways, just something interesting to think about / expect for the future. What do you guys think? Any must-have features or anything like that? Any tricks about doing math stuff in Axe?
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: z80 CAS ideas
« Reply #1 on: August 15, 2011, 10:27:51 pm »
O.O that's a lot of functions.
IMO what is included on the 89 and/or nspire CAS is a good place to start.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: z80 CAS ideas
« Reply #2 on: August 15, 2011, 11:01:46 pm »
First of all, you're almost certainly going to have to at least be familiar with ASM to write a good CAS. Sorry, it just works out that way.

Secondly, I would highly recommend a numerical core to any math product. The symbolic manipulations available in a CAS are useful. However, they're far more powerful when combined with a numerical package. The majority of those functions you see on the Wolfram site (~99% of which are never used) are numerical algorithms, not symbolic functions. To get a basic CAS/numerical math package up, you pretty much need the following capabilities:

Symbolic differentiation
Symbolic integration (which is a formally undecidable problem, so don't worry about restricting the range of functions allowed as input)
Symbolic simplification
Array generation (generate arrays of numbers according to some rule)
Map (maps a function accepting 1 argument to each element of an array)
Symbolic functions
Eval (Numerically evaluates a user defined symbolic function at a point)
Plot <function>
Sin/Cos/Tan/ArcSin/ArcCos/ArcTan/CoSecant/Secant/Cotangent
Prime(n) (returns the nth prime number)
Numerical differentiation
Numerical integeration
Elementary operations (+,-,*,/,^,Logn,Abs, etc... These are generally expected to work on all numerical data types without complaint)
Some method of writing programs (either with a built-in scripting language or with a Well-documented API. Yes, this is entirely necessary.)
Rand (generates a random decimal number)
RandInt (generates a random integer)


Keep in mind that this is about the minimum to have a useful CAS.



« Last Edit: August 16, 2011, 12:01:51 am by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: z80 CAS ideas
« Reply #3 on: August 16, 2011, 11:15:10 pm »
* buttsfredkin bookmarks thread

Sometime, next year, in pre-cal, I'm gonna come back to this, when I understand more math. And if I do make it, it will be in Axe - just you wait and see :)
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline sqrt(Time)

  • LV2 Member (Next: 40)
  • **
  • Posts: 37
  • Rating: +4/-0
    • View Profile
Re: z80 CAS ideas
« Reply #4 on: September 14, 2011, 09:07:35 pm »
If I have a CAS I'm considering, there are really only three things I look at:
-Flexibility of the integrator
-Flexibility of a symbolic equation solver (i.e. could it solve ((x+1)*x+1)*x+1=0? tan(4x)+tan(6x)=0? tan(4x)+tan(6x)=tan(x)?)
-Numerical integrator supports a wide variety of functions, can do arbitrary (or at least very high) precision

It's generally tricky to get the first to a point where it's better than any Joe who's passed their AP Calc. A solver can generally try many things at once, and is reliant on a good simplification/manipulation repertoire, which I think is usually hard-coded in largely. (eg. If you have (x-y), try multiplying by (x+y). If you have 1/x+1/y, try to combine the fractions. If you have a*b/c, try replacing with a/(c/b).)
Numerical integration, finally, is something that humans can't really do by themselves, so having something with high precision and the ability for a lot of inputs is good.

Hmm, you know, I'm wondering now how good of arbitrary precision libraries there for the z80? I mean I know there's arbitrary multiplication/addition, what about, say, sin(x) or e^x or log(x)? I've made a fast implementation of e^x before for my own entertainment (in Java, though)... I would be pretty impressed if some just implemented TI-OS's functions with arbitrary precision.

Note: Extraordinary high expectations for CAS above (not so much the arbitrary precision, I think that part's realistic) - I've been spoiled with free Mathematica since age 11.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: z80 CAS ideas
« Reply #5 on: September 14, 2011, 09:21:34 pm »
Sqrt(time), you're kind of implicitly assuming that CASes solve equations the same way humans do. As it turns out, the algorithms (normal) humans typically use are either remarkably inefficient (e.g. the partial fractions method of Rational Integration) or almost impossible to implement (e.g. algebraic solving by heuristics).
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline sqrt(Time)

  • LV2 Member (Next: 40)
  • **
  • Posts: 37
  • Rating: +4/-0
    • View Profile
Re: z80 CAS ideas
« Reply #6 on: September 14, 2011, 11:54:53 pm »
Sqrt(time), you're kind of implicitly assuming that CASes solve equations the same way humans do. As it turns out, the algorithms (normal) humans typically use are either remarkably inefficient (e.g. the partial fractions method of Rational Integration) or almost impossible to implement (e.g. algebraic solving by heuristics).
Oh.. I did think that, yes.. I admit I don't know that much about what algorithms a CAS uses for that kind of thing, sorry. The only one I've really heard of is the Risch algorithm, which is kind of a monstrosity and largely above my head. If you know more about how they work, could you maybe provide some info/links?

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: z80 CAS ideas
« Reply #7 on: September 14, 2011, 11:57:58 pm »
Try reading Algorithms for Computer Algebra. It's an excellent resource for that kind of stuff. As for the Risch algorithm...
* Qwerty.55 shudders

It's great at solving monstrous integrals that would fry your brain, but it's very bad at producing pretty answers. For example, the integral of Sin(X) produces a nasty little equation involving imaginary exponentials that's equivalent to -Cos(x).
« Last Edit: September 14, 2011, 11:58:51 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline sqrt(Time)

  • LV2 Member (Next: 40)
  • **
  • Posts: 37
  • Rating: +4/-0
    • View Profile
Re: z80 CAS ideas
« Reply #8 on: September 15, 2011, 12:12:20 am »
...thanks! I'll check it out.  ;D

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: z80 CAS ideas
« Reply #9 on: September 17, 2011, 09:51:24 am »
Yay, quoting myself.
I remember critor made a tool called Autocalc that, if combined with prettyprint, MathPrint OSes and Symbolic, acted like a CAS kinda.
Also, Symbolic is released with the source code here.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s