Solving linear equations systems with > 9 variables accurately?

06052015, 06:28 PM
(This post was last modified: 06052015 06:30 PM by Dieter.)
Post: #1




Solving linear equations systems with > 9 variables accurately?
I am currently designing two rational approximations for the Normal distribution's quantile function, with a working range from 0,5 to 1 E–99. The desired 10digit accuracy (with a 13digit implementation in HP41 MCODE) requires solving linear equation systems with 9...11 variables. I usually do this with Excel, but with 1012 digit target accuracy of the solution this is simply not possible with Excel's 15 digit working precision.
So I did the 9variablecase on a 34s. and the results came out accurately. Great, so this problem was solved. But 9 unknowns are the maximum the 34s can handle: it requires 81 registers for the matrix, 9 for the right hand side vector and another 9 for the solution, so 99 out of 100 registers are used. But what can I do for the 10 or 11variable case? I do not have access to Mathematica, Maple or other commercial math software, and I do not know a way to trick the 34s into handling larger matrices. Does anyone know of a (free) solution that runs on Windows XP/7? Or maybe there is a way using the 34s emulator...?) Dieter 

06052015, 08:11 PM
Post: #2




RE: Solving linear equations systems with > 9 variables accurately?
The Answer to Everything: (Free)42 !
34 digits, builtin matrix support, even 100x100 matrices are no problem. Cheers, Werner 

06052015, 08:36 PM
(This post was last modified: 06062015 07:46 AM by Marcio.)
Post: #3




RE: Solving linear equations systems with > 9 variables accurately?
Scilab  open source is quite similar to Matlab and can handle any kind of system you need. Linear, nonlinear, complex... Name it!
This is how to enter data: x = [1 2; 0 4]; y = [4 5; 9 1]; Type x/y on the command line and you'll get the result. How sweet is that? You could also store the data to any var you want: z = x/y EDIT: If dealing with large amounts of data, you could import them from excel or type them using the variable editor. If that is the case, create 'x' first, ie x=[] on the command line, and then double click it on the variables browser to start keying in data using a spreadsheet that is automatically created for that particular variable. After getting the results on the screen, you'll want to format them, do so like this: format('v',3+12) Hope it helps! 

06062015, 07:19 PM
Post: #4




RE: Solving linear equations systems with > 9 variables accurately?
(06052015 08:11 PM)Werner Wrote: The Answer to Everything: (Free)42 ! (06052015 08:36 PM)Marcio Wrote: Scilab  open source is quite similar to Matlab and can handle any kind of system you need. Linear, nonlinear, complex... Name it! Werner and Marcio, thank you very much. I was not aware of Scilab as a powerful free numeric math package. I also did not know that the later releases of Free 42 use the decimal64 library for 34digit precision without the wellknown problems of binary encoded numbers. I think Free 42 should be able to calculate the matrix coefficents and then solve the resulting equation system. ;) Dieter 

06082015, 11:51 AM
Post: #5




RE: Solving linear equations systems with > 9 variables accurately?
Hello Dieter,
There are even more free open source alternatives: Numeric calculations: OCTAVE (a MATLAB clone), Python with numpy and scipy modules. Symbolic/numeric calculations: MAXIMA. Regards Bernd 

06082015, 12:20 PM
(This post was last modified: 06082015 12:21 PM by Marcio.)
Post: #6




RE: Solving linear equations systems with > 9 variables accurately?
(06082015 11:51 AM)Bernd Grubert Wrote: Hello Dieter, Last time I used Octave was 3 years ago. It seems things improved considerably since then. There was not even a stable version for windows. I had to install cygwin (Unixlike environment and commandline interface for windows) to get it run to my satisfaction. Octave now has a beautiful UI. Congrats to the development team!! 

06082015, 09:47 PM
Post: #7




RE: Solving linear equations systems with > 9 variables accurately?
Dieter,
I believe we allowed matrices to occupy local registers on the 34S which would give you the space you require. Pauli 

06092015, 08:22 PM
Post: #8




RE: Solving linear equations systems with > 9 variables accurately?
(06082015 09:47 PM)Paul Dale Wrote: I believe we allowed matrices to occupy local registers on the 34S which would give you the space you require. If I understand the manual correctly, the local registers correspond to addresses ≥ 112. So the 10x10 matrix would occupy R00...R99 and the righthand side as well as the solution vector is stored in the local register area (≥ 112). Is this correct? In the meantime I did the mentioned calculations on Free42 (decimal version). Works great. Dieter 

06092015, 10:01 PM
Post: #9




RE: Solving linear equations systems with > 9 variables accurately?
(06092015 08:22 PM)Dieter Wrote: If I understand the manual correctly, the local registers correspond to addresses ≥ 112. So the 10x10 matrix would occupy R00...R99 and the righthand side as well as the solution vector is stored in the local register area (≥ 112). Is this correct? Yep. It should also be possible to fit the 10x10 matrix in the locals depending on RAM allocation.  Pauli 

06112015, 10:54 AM
Post: #10




RE: Solving linear equations systems with > 9 variables accurately?
(06092015 10:01 PM)Paul Dale Wrote: Yep. It should also be possible to fit the 10x10 matrix in the locals depending on RAM allocation. OK. But there's still one problem: AFAIK all local registers are lost as soon as the program terminates (RTN). So all calculations would have to be done in one single program run. My program however first calculates the matrix coefficients (get user input #i => calculate coefficients a_{i,1}...a_{i,9} and b_{i}) and afterwards the equation system is solved. Dieter 

06142015, 05:40 AM
Post: #11




RE: Solving linear equations systems with > 9 variables accurately?
(06082015 11:51 AM)Bernd Grubert Wrote: Hello Dieter, The J programming language, which has extended precision rationals, might also be of interest. (J was developed by Ken Iverson and Roger Hui as a successor to APL, so it's definitely focused on matrix manipulation.) 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)