Register

Eigenmath for the Prizm

Topics on released projects. Only the author of a program should start a topic on it.
Senior Member
Posts: 141
Joined: Wed May 16, 2012 2:50 pm
Location: Portugal
Calculators: Casio fx-CG20

Eigenmath for the Prizm

Postby gbl08ma » Fri Aug 23, 2013 2:30 pm

During the past two weeks, I have been working on porting the Eigenmath math engine to the Casio Prizm. The official website of Eigenmath is currently at http://gweigt.net/eigenmath.html and the only version available seems to be distributed through the Mac App Store, however if you look around enough on the internet, you'll find Windows, Linux and even Nintendo DS builds. And from on now, Eigenmath is available for the Prizm, too!

ImageImage

As you see, some simple form of natural display is supported. When the natural display output is too large to fit in a single line, the equivalent to Casio's "Line" display mode is used, meaning natural display is disabled.
Matrices small enough to fit in the screen are also displayed in a more natural way.
This port of Eigenmath also includes a function catalog. Help for each function may be included in the future.

ImageImage
Image

Unlike diameter's port of Eigenmath to the fx9860, in this port big numbers are supported and the results are right for 99% of the symbolic calculations. Floating point numbers are also supported, even though the precision could be better. Anyway, for that kind of math, you can use Casio's Run-Mat ;)
Also, the keyboard keys are linked to Eigenmath functions and symbols as much as I could. The ! for factorials can be inserted with the store (→) key.

Unfortunately it is a bit slow. Memory leaks from Beta 1 seem to have been mostly fixed in Beta 2. If you start getting memory/malloc-related errors, exit the add-in (open another) then open Eigenmath again.
System errors should never occur, though.

Known issues (important)
Factorizing x^2+1 returns (x+1)(x-1) which is clearly wrong. The Linux build of Eigenmath, which was built from the same source code that this port was based on, correctly returns x^2+1 when factorizing. I have done tests and couldn't find other problems when factorizing. Please let us know if you find any more wrong results. You have been warned.

Source code
The add-in is licensed under the GNU GPL v2 and source code will appear on my GitHub soon. Right now the build process is quite hackish, it needs
(((Casio's library for the fx9860) with modifications by Simon) converted to GCC format)
along with
((libm and libc) hacked together from (AHelper's fork of libfxcg))
Yeah, that mix is right and I even put parentheses for you to parse better. Right now my development environment is a mess, worse than those parentheses.

Download
Make sure to read the "known issues" above. Also, read the disclaimer that appears when you press F6 when running the add-in.
Download Beta 2
Last edited by gbl08ma on Thu Sep 05, 2013 10:16 pm, edited 1 time in total.

Senior Member
Posts: 369
Joined: Tue Jan 03, 2012 11:24 pm
Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400

Re: Eigenmath for the Prizm

Postby helder7 » Sat Aug 24, 2013 1:23 am

Nice job! Finally prizm received a cas add-in. :thumbup:
Natural display combined with function catalog and linked keys make it more intuitive and easier to use than the fx9860 port.

I will test more in depth tomorrow. Today only had time to test simple algebra (derived functions and some trigonometry).
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Member
Posts: 37
Joined: Sat Jun 22, 2013 10:54 am
Calculators: Casio fx-9860GII

Re: Eigenmath for the Prizm

Postby scientifix » Fri Aug 30, 2013 5:31 pm

Hey,
Is your add in based on the same source code as the "eigenmath add in by diameter"?
Is your add in (the eigenmath for prizm) portable to the fx9860gII ?
Thanks again an : GOOD JOB (your add in looks great !!) !!
scientifix

Senior Member
Posts: 141
Joined: Wed May 16, 2012 2:50 pm
Location: Portugal
Calculators: Casio fx-CG20

Re: Eigenmath for the Prizm

Postby gbl08ma » Fri Aug 30, 2013 5:52 pm

Other than the Eigenmath , my add-in shares nothing with diameter's port. The problem with eigenmath on the fx9860 is the small amount of RAM and lack of support for big numbers by Casio's SDK.

Senior Member
Posts: 141
Joined: Wed May 16, 2012 2:50 pm
Location: Portugal
Calculators: Casio fx-CG20

Re: Eigenmath for the Prizm

Postby gbl08ma » Mon Sep 02, 2013 10:46 pm

helder, how did the in-depth test go? :)

Senior Member
Posts: 369
Joined: Tue Jan 03, 2012 11:24 pm
Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400

Re: Eigenmath for the Prizm

Postby helder7 » Tue Sep 03, 2013 4:10 pm

I did many tests using the various commands and comparing the result with the windows version and I found no new calculation errors/bugs.

Regarding the GUI, I found a situation (calculating a big factorial) that the result does not fit on the screen and as is not possible scroll up/down was not possible to see the complete result. However, I will not suggest to add the scroll function because that would spend more memory and we have a considerably large space for display results (compared for example with fx9860 and his jeuxcasio cas/eigenmath port that also do not have scroll).

I have only one suggestion: link the key combination [shift+ln] to the comamand exp(
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Senior Member
Posts: 141
Joined: Wed May 16, 2012 2:50 pm
Location: Portugal
Calculators: Casio fx-CG20

Re: Eigenmath for the Prizm

Postby gbl08ma » Tue Sep 03, 2013 5:40 pm

I know about the big results not fitting on the screen problem. I thought about implementing scroll but it would be too much work with the current implementation. The current console code is a modification of the one diameter uses in his port, to use PrintMiniFix and work on the Prizm.

Anyway, the current UI is more or less just a placeholder until I develop something more powerful with proper history like Casio's Run-Mat. But that will have to wait for version 2.0.

And you're right about the Shift+Ln key, I forgot about it. Also note that the log and exp functions on Eigenmath are not base-10, but the natural ones. So on Eigenmath log(10) returns 2.30 instead of 1. That's why I put log() on the ln key and it's also why exp is going to be on the ln key.

Senior Member
Posts: 369
Joined: Tue Jan 03, 2012 11:24 pm
Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400

Re: Eigenmath for the Prizm

Postby helder7 » Wed Sep 04, 2013 11:20 pm

I know/checked that eigenmath use log with base (e), not (10). However, I usually work more often with logharitms of base 10. Is there a formula to convert the base of logarithms and as eigenmath support custom functions, a logab function (for exemple) can be easily implemented by final users, just writing a line.

Left below some examples of math functions , if someone needs .

Code: Select all
logab(a,b)=log(b)/log(a)
cis(x)=cos(x)+i*sin(x)
npr(n,r)=(n!)/(n-r)!
ncr(n,r)=n!/(r!(n-r)!)


After closing the add-in and open another will be necessary to rewrite the functions again.
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Senior Member
Posts: 141
Joined: Wed May 16, 2012 2:50 pm
Location: Portugal
Calculators: Casio fx-CG20

Re: Eigenmath for the Prizm

Postby gbl08ma » Thu Sep 05, 2013 10:06 am

Thanks helder for the functions, I'll see what I can do to have Eigenmath run a set of customized lines at the start of the add-in.

I have good news. The developer of Eigenmath (to whom I had complained about the memory leak problems a while ago) emailed me a fix for the memory leak he found. I haven't tested it yet, let's see.

To have a log function of base 10 on Eigenmath, one can define it like this:
Code: Select all
log10(x) = log(x)/log(10)

You will need to use the float function to get the decimal value, or if you always want to see the decimal representation, you can define log10 like this:
Code: Select all
log10(x) = float(log(x)/log(10))


Of course, to have exp with base 10 it's as simple as using 10 with power x. If you really really want it...
Code: Select all
exp10(x)=10^x

Senior Member
Posts: 141
Joined: Wed May 16, 2012 2:50 pm
Location: Portugal
Calculators: Casio fx-CG20

Re: Eigenmath for the Prizm

Postby gbl08ma » Thu Sep 05, 2013 10:17 pm

Beta 2 is out, fixing the memory leaks that happened with some calculations (most noticeable with defint, integral and derivative). The download short link is the same and it points to the same long URL - only the binary that's there for download is different.

The size of Beta 2 is 317,3 KiB and its sha1 sum is:
4a5857da5359e91ae72091fa17a1f2ba668c4e0b
You can also check which version you have by pressing F6 while the add-in is running.

New feature:
You can now have something like a script run every time you start Eigenmath for the Prizm. Simply put your commands (one per line) as you would do on the calculator, on a file called eigensup.txt.

This file should go on the root of the Storage Memory. It should have Windows line endings (CR+LF or "\r\n"). Saving it with Windows' notepad will usually do the trick.

For a start, I recommend the following startup script (with suggestions from helder and Lionel Debroux):
Code: Select all
logab(a,b)=log(b)/log(a)
log10(x)=log(x)/log(10)
ln(x)=log(x)
cis(x)=cos(x)+i*sin(x)
cot(x)=1/tan(x)
coth(x)=cosh(x)/sinh(x)
arccot(x)=arctan(1/x)
arccoth(x)=arctanh(1/x)
sec(x)=1/cos(x)
sech(x)=1/cosh(x)
arcsec(x)=arccos(1/x)
arcsech(x)=arccosh(1/x)
csc(x)=1/sin(x)
csch(x)=1/sinh(x)
arccsc(x)=arcsin(1/x)
arccsch(x)=arcsinh(1/x)
npr(n,r)=(n!)/(n-r)!
ncr(n,r)=n!/(r!(n-r)!)

Next

Return to Released Projects

Who is online

Users browsing this forum: No registered users and 0 guests