Register

FX-CP400 Bug in LU

Discuss anything related to calculators. For specific help on certain games/programs check the Released Projects subforum.
Junior Member
Posts: 7
Joined: Mon Nov 04, 2013 1:41 am
Calculators: Casio fx-CG10, Casio Classpad fx-CP400

FX-CP400 Bug in LU

Postby richmit » Mon Nov 04, 2013 2:20 am

Hi;

I just punched the following into my shiny new CPII: LU([[0,2,3][4,5,6][7,8,9]],L,U)

and it blew up with "ERROR: Insufficient Memory". Seems to happen with any matrix I put in with a 0 in the [1,1] spot. At first I thought that this might be because it is an "LU" without pivoting, but other matrices that require pivoting work just fine. Well, I shouldn't say "work fine" -- they don't return an error, but the L & U you get won't multiply out to be the origonal matrix. For example [[1,2,3][4,8,6][7,8,5]] yield L and U such that LU=[[1,2,3][7,8,5][4,8,6]] -- i.e. the last two rows are swapped because the LU needed to pivot to avoid division by zero at the [2,2] spot. So I have two questions for people with more experience on this platform than I have:

1) Is this bug in the older CP machines, or was it introduced with the CPII?

2) Why don't they do a "P^(-1)LU" decomposition like other calcs (ex: HP prime, HP48, HP50, TI89, etc...)

PS: I have filed bug reports with Casio USA. Anyone have any experience with how well Casio addresses this kind of thing in future firmware releases?

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: FX-CP400 Bug in LU

Postby helder7 » Mon Nov 04, 2013 7:19 pm

Welcome to the forum richmit. Thank you for joining us.

I tried to solve the matrix LU decomposition LU([[0,2,3][4,5,6][7,8,9]],L,U) in my Classpad 330 with OS 3.06.1000 and the calculator solved it successfully. Below follows a screenshot, captured with Classpad Screen Capture:

Image

I think I answered your first question, the old classpads are able to solve this LU decomposition.

The error message that it returns on fx-Cp400, "ERROR: Insufficient Memory", suggests that the problem is related with insufficient memory,... and is probably the cause of it. Compared with the ti-nspire or hp prime, the Classpad II has little ram. The user ram (500kb) remained the same as the old classpads, even with the upgrade of the screen/calc to the color according to this page.

The emulator of fx-cp400 is able to solve it, but the calculator no:

Calculator:                                                     Emulator:
Image Image


According to the official manual, page 268:
Error message: insufficient memory
Description: There is not enough memory to complete the operation you are trying to perform.


I'm not sure if it's a bug or a memory limitation, but if you have already contacted the Casio USA possibly they give a better answer.

------------------------------------------------------------------

Regards the second part of your initial question, L*U≠[[1,2,3],[4,8,6],[7,8,5]], for LU([[1,2,3],[4,8,6],[7,8,5]],L,U)
I tested in wolfram alpha and L and U values that the calculator gives are correct. You can check here: http://o8a.0j.sl.pt These values are the same of my screenshot below:

Image

You need calculate an extra variable Matrix, P (permutation matrix), for P*L*U=[[1,2,3],[4,8,6],[7,8,5]]. However, i dont konw (yet) hot to calculate the P (permutation matrix) of a matrix in classpad.

EDIT1:
Sorry for the downtime yesterday. You can calculate the P manually with that formula:
P=(L*U)/A
where A is the original matrix

Will be nice if Casio add an optional parameter, P, for the LU command in Classpad.
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Junior Member
Posts: 7
Joined: Mon Nov 04, 2013 1:41 am
Calculators: Casio fx-CG10, Casio Classpad fx-CP400

Re: FX-CP400 Bug in LU

Postby richmit » Tue Nov 05, 2013 6:17 pm

Thank you for all the details!

I can't imaging that it is a memory limitation. The standard LU algorithm only takes 2x the amount of storage required to store the original matrix, and the LU factorization with Partial Pivoting (i.e P(^-1)LU factorization) takes 2x+sqrt(x) the space required for the original matrix if the P matrix is stored at all. I think they can probably fix it in the next firmware update.

I think one of the confusing things is that sometimes LU with PP is just called LU -- because LU will fail if a zero appears on the diagonal at any time during the computation, so almost nobody uses pure LU. Lots of tools to that. Mathematica, Maple, Wolfram Alpha, maxima, etc... They all return the P. I agree with you in that it would be nice if the classpad did it too. While one can get the P by inverting the original matrix, it seems morally wrong somehow. :)

Casio USA is forwarding off the bug report to Casio Japan (apparently the classpad isn't officially released in the US yet).

Junior Member
Posts: 2
Joined: Tue Jan 14, 2014 2:21 pm
Calculators: Casio Classpad fx-CP400

Re: FX-CP400 Bug in LU

Postby cdi.comics » Tue Jan 14, 2014 2:28 pm

I have a 400 and ClassPad II also can not decompose an LU matrix. how can I solve this problem. Also do not have much information of all functions of the CP400. is there any place where there is more information and toturiais video?

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

Re: FX-CP400 Bug in LU

Postby gbl08ma » Tue Jan 14, 2014 7:23 pm

This is more or less offtopic, but I only noticed this thread now.
The fact that the fx-CP400 can't solve that decomposition but its emulator can, may indicate that the emulator is in fact a simulator. Note how it supports multiple window resolutions, apart from orientation switching.
Other possibility is that they are using Windows Embedded/CE on the real hardware and putting their shell on top (like they did with ROM-DOS on the Algebra FX series). So there wouldn't be many differences between the "emulator" and the real device except for the amount of RAM available and processor speed.

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: FX-CP400 Bug in LU

Postby helder7 » Wed Jan 15, 2014 10:57 pm

cdi.comics wrote:is there any place where there is more information and toturiais video?

There is Classpad101 site with some pdf guides explain the functions of the previous b&w models. I think that even being done to an older model, is easy to understand.
The fx-cp400 manual also helps to understand some commands/functions.
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Return to General

Who is online

Users browsing this forum: No registered users and 67 guests