Enter forum description here ...
No se han encontrado topics similares.
0
COMPLETADO
Memory leak?
Hi,
On my Windows 64bit and Linux systems with MP ver.3.7.9 and 3.8.0, running the following code causes a strange memory usage that increases linearly and blows up, as the for-loop goes:
mp.Digits(34);
A=mp(ones(1000));
for k=1:1000
A=A.^2;
end
On my Windows 64bit and Linux systems with MP ver.3.7.9 and 3.8.0, running the following code causes a strange memory usage that increases linearly and blows up, as the for-loop goes:
mp.Digits(34);
A=mp(ones(1000));
for k=1:1000
A=A.^2;
end
0
COMPLETADO
Use of Polyeig function
Could you please provide an example of polyeig function. I would like to calculate eigen value as
A0=mp(rand(100)); A1 =mp(rand(100)); A2 =mp(randn(100))
[V,D]= polyeig(A0,A1,A2);
But this gives error
Index exceeds matrix dimensions.
Error in ==>
C:\Users\lAPi\Documents\Multiprecision
Computing Toolbox\lib\mppolyeig.p>mppolyeig
at 53
Error in ==> mp>mp.polyeig at 2691
[varargout{1:nargout}] =
mppolyeig(varargin{:});
Error in ==> trial_current_mt_highk at 255
[V,D]= polyeig(A0,A1,A2);
A0=mp(rand(100)); A1 =mp(rand(100)); A2 =mp(randn(100))
[V,D]= polyeig(A0,A1,A2);
But this gives error
Index exceeds matrix dimensions.
Error in ==>
C:\Users\lAPi\Documents\Multiprecision
Computing Toolbox\lib\mppolyeig.p>mppolyeig
at 53
Error in ==> mp>mp.polyeig at 2691
[varargout{1:nargout}] =
mppolyeig(varargin{:});
Error in ==> trial_current_mt_highk at 255
[V,D]= polyeig(A0,A1,A2);
0
Solucionado
reshape sparse matrix
Hello,
it seems that there is a problem when trying to reshape mp sparse matrices. For example, the code
toto=mp(rand(16,16));
reshape(toto,4,4^3)
does work (not a sparse matrix). But
toto=mp(sprand(16,16,0.3));
reshape(toto,4,4^3)
crashes Matlab (has to be closed and restarted completely). Would it be possible to correct this, as reshaping is one of the basic tools ?
Thanks,
Adam
it seems that there is a problem when trying to reshape mp sparse matrices. For example, the code
toto=mp(rand(16,16));
reshape(toto,4,4^3)
does work (not a sparse matrix). But
toto=mp(sprand(16,16,0.3));
reshape(toto,4,4^3)
crashes Matlab (has to be closed and restarted completely). Would it be possible to correct this, as reshaping is one of the basic tools ?
Thanks,
Adam
0
Respuestas
Exchanging a value in a double precision array
Hello.
I am not sure if the following is really intended:
Adding a mp number to a double number:
a=mp('1.1');
b=1.1;
test=a+b;
The variable test is a mp number, so the variable 'b' was cast to mp.
If I assign a mp number to a double array, it will be cast to double.
A=1:10;
A(1,1)=A(1,1)+a;
The array A is still double.
Probably this is done intentionally, but I think it was different in an older version. (I have the newest one)
Best regards,
Michael
I am not sure if the following is really intended:
Adding a mp number to a double number:
a=mp('1.1');
b=1.1;
test=a+b;
The variable test is a mp number, so the variable 'b' was cast to mp.
If I assign a mp number to a double array, it will be cast to double.
A=1:10;
A(1,1)=A(1,1)+a;
The array A is still double.
Probably this is done intentionally, but I think it was different in an older version. (I have the newest one)
Best regards,
Michael
0
Respuestas
Invalid MEX-file
Hi,
I'm trying to run my program using the toolbox on a cluster running on Linux (I use the corresponding version of the toolbox). Unfortunately I get the error "Invalid MEX-file mpimpl.mexa64: ELF file OS ABI invalid".
The version of Matlab on the cluster is R2011b. Could this be the problem ?
(As a side question, would the toobox work on Octave ?)
Thanks,
Adam
I'm trying to run my program using the toolbox on a cluster running on Linux (I use the corresponding version of the toolbox). Unfortunately I get the error "Invalid MEX-file mpimpl.mexa64: ELF file OS ABI invalid".
The version of Matlab on the cluster is R2011b. Could this be the problem ?
(As a side question, would the toobox work on Octave ?)
Thanks,
Adam
0
Planeado
Speed Comparison to MATLAB Double Precision
I see speed comparisons vs. MAPLE. Do you have speed comparisons (slowdown factor) vs. MATLAB double precision? Thanks.
0
Solucionado
Spare matrix division by a scalar
I have a problem when I try to divide a sparse matrix by a scalar. These few lines work perfectly in Matlab
norm0=max(abs(M(:)))
M=M/norm0
where M is a (possibly sparse) matrix.
Using the toolbox, it only works if M is full, and for a sparse matrix I get
One or more output arguments not assigned during call to "mpimpl".
Error in / (line 1055)
r = mpimpl(35,x,y);
Is there a way to get around that efficiently ?
Also, is there any chances that the function svds will be implemented soon ?
Adam
norm0=max(abs(M(:)))
M=M/norm0
where M is a (possibly sparse) matrix.
Using the toolbox, it only works if M is full, and for a sparse matrix I get
One or more output arguments not assigned during call to "mpimpl".
Error in / (line 1055)
r = mpimpl(35,x,y);
Is there a way to get around that efficiently ?
Also, is there any chances that the function svds will be implemented soon ?
Adam
0
Respuestas
Change precision of mp object
Hello.
I got a few questions about the initialisation of mp-numbers and the used precision.
A short example:
mp.Digits(34);
%cuts the number at 34 decimal digits
number34digits = mp('0.123456789123456789123456789123456789') ;
%number with lower precision
number9digits = mp('0.123456789',9);
%Some calculations
number9digits-mp('10^-20')
ans = 0.123456789
number9digits-mp('10^-9')
ans = 0.123456788
number9digits-mp('10^-20',34)
ans = 0.123456789
mp('10^-20')-number9digits
ans = -0.12345678894780576228095458984375
Interestingly this works as well:
number9digits-'10^-9'
ans = 0.123456788
Obviously the calculations are done with the precision of the first number, even the global precision is 34 digits.
%Another calculation
number34digits-number9digits
ans = 1.756510268325021992797067835708226e-10
number9digits-number34digits
ans = -1.75651027e-10
I assume the calculation is done with 34 digits precision and the number9digits is converted to 34 digits. The converted version of number9digits in 34 digits is not 0.1234567890000000000000000000000000.
mp(number9digits,34)
ans = 0.12345678894780576229095458984375
I guess the reason for that is, that the binary number is converted and not the decimal one.
If I define:
number9digits_ = mp('0.123456789',34);
number34digits-number9digits_
ans = 1.23456789123456789123456781439154e-10
The result is different of course, since the number9digits_ was defined with 34 digits precision.
Could you provide a more detailed documentation on this matter? Which precision is acctually used in calculations when numbers with different precision are used?
I was wondering if it is possible to make a function which simply converts a low precision number like
numberlowprecision = mp('1.234',9);
to a higher precision number like
numberhighprecision = mp(numberlowprecision,34)
which is acctually
numberhighprecision = mp('1.234',34);
For double numbers I am able to do that with an work around:
doublenumber = 1.234;
mpnumber = (num2str(doublenumber),34);
I did not find a mp2str function but maybe I missed it.
A question on another matter is the initialisation of mp-arrays. I did not get the syntax yet. I tried:
mparray = mp('[1.23456,1.23456]');
mparray = mp({'1.23456','1.23456'})
Thank you for your answer.
I got a few questions about the initialisation of mp-numbers and the used precision.
A short example:
mp.Digits(34);
%cuts the number at 34 decimal digits
number34digits = mp('0.123456789123456789123456789123456789') ;
%number with lower precision
number9digits = mp('0.123456789',9);
%Some calculations
number9digits-mp('10^-20')
ans = 0.123456789
number9digits-mp('10^-9')
ans = 0.123456788
number9digits-mp('10^-20',34)
ans = 0.123456789
mp('10^-20')-number9digits
ans = -0.12345678894780576228095458984375
Interestingly this works as well:
number9digits-'10^-9'
ans = 0.123456788
Obviously the calculations are done with the precision of the first number, even the global precision is 34 digits.
%Another calculation
number34digits-number9digits
ans = 1.756510268325021992797067835708226e-10
number9digits-number34digits
ans = -1.75651027e-10
I assume the calculation is done with 34 digits precision and the number9digits is converted to 34 digits. The converted version of number9digits in 34 digits is not 0.1234567890000000000000000000000000.
mp(number9digits,34)
ans = 0.12345678894780576229095458984375
I guess the reason for that is, that the binary number is converted and not the decimal one.
If I define:
number9digits_ = mp('0.123456789',34);
number34digits-number9digits_
ans = 1.23456789123456789123456781439154e-10
The result is different of course, since the number9digits_ was defined with 34 digits precision.
Could you provide a more detailed documentation on this matter? Which precision is acctually used in calculations when numbers with different precision are used?
I was wondering if it is possible to make a function which simply converts a low precision number like
numberlowprecision = mp('1.234',9);
to a higher precision number like
numberhighprecision = mp(numberlowprecision,34)
which is acctually
numberhighprecision = mp('1.234',34);
For double numbers I am able to do that with an work around:
doublenumber = 1.234;
mpnumber = (num2str(doublenumber),34);
I did not find a mp2str function but maybe I missed it.
A question on another matter is the initialisation of mp-arrays. I did not get the syntax yet. I tried:
mparray = mp('[1.23456,1.23456]');
mparray = mp({'1.23456','1.23456'})
Thank you for your answer.
0
Respuestas
Citing the Multiple Precision Toolbox
Hi Pavel,
how are you doing? We are now in the last stage of preparing the next release of the Rational Krylov Toolbox. When updating the guide I was wondering what would be the best way to cite your toolbox? I looked at several papers in the literature which referred to the toolbox, and there doesn't seem to be any agreement. For example, I've seen
- Advanpix. Multiple Precision Toolbox. www.advanpix.com
- www.advanpic.com MP toolbox.
- MATLAB Multiple Precision Toolbox.
I think it would be very useful to many authors if you could add to your website how to cite the toolbox, perhaps even providing a bibitem? Perhaps you can even create an EPrint from the documentation? Or perhaps there already is one?
As promised, I will let you know about our release in due course.
Greetings from Manchester,
Stefan
how are you doing? We are now in the last stage of preparing the next release of the Rational Krylov Toolbox. When updating the guide I was wondering what would be the best way to cite your toolbox? I looked at several papers in the literature which referred to the toolbox, and there doesn't seem to be any agreement. For example, I've seen
- Advanpix. Multiple Precision Toolbox. www.advanpix.com
- www.advanpic.com MP toolbox.
- MATLAB Multiple Precision Toolbox.
I think it would be very useful to many authors if you could add to your website how to cite the toolbox, perhaps even providing a bibitem? Perhaps you can even create an EPrint from the documentation? Or perhaps there already is one?
As promised, I will let you know about our release in due course.
Greetings from Manchester,
Stefan
0
Solucionado
Convert complex numbers from mp to sym
Hello again.
The following statement leads to an error:
x = mp('1i');
xvpa = mp2sym(x);
I think the reason is the following:
xvpa = vpa('1*i') (This works)
xvpa = vpa('1i') (Without "*" it gives an error)
The following statement leads to an error:
x = mp('1i');
xvpa = mp2sym(x);
I think the reason is the following:
xvpa = vpa('1*i') (This works)
xvpa = vpa('1i') (Without "*" it gives an error)
Servicio de atención al cliente por UserEcho