XtrmCAS
33 posts
• Page 1 of 4 • 1, 2, 3, 4
XtrmCAS
Hi I'm developing an open-source CAS, in C.
Project Tittle: XtrmCAS
Description: A CAS easy to port to all calculators.
Languages: C
Project Leader: Xtrm0
Members: None (YET)
Github: https://github.com/xtrm0/XtrmCAS
Download Links:
V0.2.0.2:
Casio fx9860 series -> [ATTACH]44[/ATTACH]
The source code is all availble at github.
Supported Opperations:
*(A)(B)
Answers: A*B
+(A)(B)
Answer: A+B
-(A)(B)
Answer: A-B
/(A)(B)
Answer: A/B
R(A)(B)
Answer: Remaining of (A/B)
Ex:
*(x-1)(x+1)
*(2x^2-14x^8-1+13*x)(-x^2+7)
Regz,
Xtrm0
BTW, if you find any bugs, please post them in here.
Project Tittle: XtrmCAS
Description: A CAS easy to port to all calculators.
Languages: C
Project Leader: Xtrm0
Members: None (YET)
Github: https://github.com/xtrm0/XtrmCAS
Download Links:
V0.2.0.2:
Casio fx9860 series -> [ATTACH]44[/ATTACH]
The source code is all availble at github.
Supported Opperations:
*(A)(B)
Answers: A*B
+(A)(B)
Answer: A+B
-(A)(B)
Answer: A-B
/(A)(B)
Answer: A/B
R(A)(B)
Answer: Remaining of (A/B)
Ex:
*(x-1)(x+1)
*(2x^2-14x^8-1+13*x)(-x^2+7)
Regz,
Xtrm0
BTW, if you find any bugs, please post them in here.
- Attachments
-
- XTRMCAS.zip
- (0 Bytes) Downloaded 873 times
What's wrong with the interface ? I attached a file with a simple implementation of some standard functions to make a console interface on fx-9860 (getchar, printf, clear) : [ATTACH]37[/ATTACH]
About your code, don't put functions code in header files.
About your code, don't put functions code in header files.
- Attachments
-
- console.zip
- (0 Bytes) Downloaded 807 times
Thanks. Right now I have got to get some sleep. But tomorow, or te day after, I will try to put here te first release.
If you got any sugestions, or would like to join the project (this is an invitation), please say (bruno7 told me you had already builded a CAS but that you lost the source. And that you wanted to build one again for the prizm).
Regz,
Xtrm0
If you got any sugestions, or would like to join the project (this is an invitation), please say (bruno7 told me you had already builded a CAS but that you lost the source. And that you wanted to build one again for the prizm).
Regz,
Xtrm0
Im working on simplification, but I'm unable to set the priorities for operations. Solving can be done easily testing all the possíble solutions (in complexity O((logN)^2), beeing N the biggest number in the first and last quoeficients). Ill create a piece of code explaining how in a moment.
After knowing how to solve its easy to factorize.
At last, I dont have integration in school, so it's not a priority to me.
If you know a way of easing the interpretion process, please help. After that, all of the obter operations would be a peace of cake.
After knowing how to solve its easy to factorize.
At last, I dont have integration in school, so it's not a priority to me.
If you know a way of easing the interpretion process, please help. After that, all of the obter operations would be a peace of cake.
Just finished it:
File: findroot.c on my github
It still neads the implementation of the wikipedia method to find irrational and complex roots. Do you think that algorithm (the wikipedia, for complex roots) would work or should I use another one? Do you remember the one you used?
Regz,
Xtrm0
- Code: Select all
#include "stdio.h"
#include "poly.h" //my polynomials class, /
//this method is based on the fact that all real rational must be in the form (a/b), where a is a divisor
//of the the highest rank poly, and b is a dividor of the lowest rank one.
//Afte that we know that the remaining root are irational, and we use some method, such as tat described in
//this page to solve: ([url]http://en.wikipedia.org/wiki/Root-finding_algorithm#Algorithm[/url])
double x_pow(double a, int b) {
int i;
double ans=a;
if (b==0) return 1;
for (i=1; i<b; i++) {
ans = a*ans;
}
return ans;
}
void printandfind(poly * a) {
int fst, lst, i,j,k;
double sum;
for (i=0; i<MAXS && a->quof[i]==0; i++); //MAXS is the maximum number of factor as defined in poly.h
fst=i;
for (i=MAXS; i>=0 && a->quof[i]==0; i--);
lst=i;
sum=0;
printf ("%d,%d\n",fst, lst);
for (i=1; i<=a->quof[fst]; i++) {
if (a->quof[fst]%i==0) {
for (j=1; j<=a->quof[lst]; j++) {
if (a->quof[lst]%j==0) {
sum=0;
for (k=0; k<MAXS; k++) {
sum += a->quof[k]*x_pow((double(i) / double(j)), k);
}
if (fabs(sum)<=0.0001) printf("%d/%d is a zero\n",i,j); //Once poly_division is done, this can be upated to find factors
}
}
}
}
//aplly wikipedia's method to a equations with no real roots(reduces time)
//TD
return;
}
int main() {
poly a, b, c;
init_poly(&a); init_poly(&b); init_poly(&c); //inits the polys
a.quof[4]=2; a.quof[3]=-11; a.quof[2]=-6; a.quof[1]=64; a.quof[0]=32; //set a to someting;
printandfind(&a);
init_poly(&a);
a.quof[2]=1; a.quof[1]=-7; a.quof[0]=12;
printandfind(&a);
return 0;
}
File: findroot.c on my github
It still neads the implementation of the wikipedia method to find irrational and complex roots. Do you think that algorithm (the wikipedia, for complex roots) would work or should I use another one? Do you remember the one you used?
Regz,
Xtrm0
33 posts
• Page 1 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 2 guests