Dine kommentarer

Thank you for the very fast update, but I am using Windows.
I will test it right away, when the release for windows is available.
Hello.

Is there any information on this problem? Or is it fixed already, did not check it lately.
I actually do not use sparse matrizes but I think it was implemented not long ago so it might be still in development.

Best regards,
Michael
Hello.

A similar error occours for

M./norm0
M.*norm0
But M*norm0 works, so for now

M=[12,1,1,1;0,1,1,0;0,1,0,1;0,0,0,1];
Msparsemp=mp(sparse(M));
norm0=max(abs(Msparsemp(:)));
Msparsemp = Msparsemp*(1/norm0);
Thank you for your quick answer.

In my matlab code I read an input file with user-specific data. In the double precision case this is no problem since I create the user-specific data file (it is a struct) and store it. If I need it again, I simply load it.

At the moment I create a new user-specific file for the version in quadruple-precision. In this user-specific file (a struct) I enter all the data with mp objects and the needed precision, for example 34 digits.

Problem is, that I need to make this file all over again when I want to change the precision of all the calculations. At the beginning I simply made the file with 128 digits precision, because I thought all the mp objects are casted to the globally defined precision, for example mp.Digits(34). As you already meationed this is not the case.

I did not try this yet, but maybe it works to do something like this

struct128digits = "a struct which contains mp objects which have been created with 128 digits precision"

save('struct128digits','struct128digits')
clear all;
mp.Digits(34);
load('struct128digits')

I did not test if the loaded struct has a precision of 128 or 34 yet. Or maybe it is possible to do something like this:

struct34digits=mp(struct128digits,34)

Which should be the same compared to a struct which was created in 34 digits.

Ps: Thank you for the effored fixing the bessel functions
Hello.

Thank you for the answer. I figured that quadruple precision should take about 20 times that of double according to this poster. (http://atip.org/SGWORKSHOP/Posters/Poster%20-%20MUKINOKI.pdf)
But maybe the reason for that is, that they use GPUs and not CPUs.
Hi.

I went through my complete code step by step now.

Most evaluations takes less than 20 times that of double precision like the evaluation of nested functions. The evaluation of nested functions involving bessel functions took me 200 times that of double, but thats not a big problem because they take only a small portion of the complete evaluation time. Following is the problem in my case:

Only a dummy multiplication:

mp.Digits(34);
A=mp(ones(600,6000))+mp(ones(600,6000))*i;
B=mp(ones(600,6000))+mp(ones(600,6000))*i;
tic
A*B.';
toc
Elapsed time is 88.208659 seconds.

In double:

A=ones(600,6000)+ones(600,6000)*i;
B=ones(600,6000)+ones(600,6000)*i;
tic
A*B.';
toc
Elapsed time is 0.368915 seconds.

I need to do such multiplications like 4 times in my code which means about 360 seconds are needed in mp precision for that compared to 1.6 seconds in double precision. If the performance in all functions would be 20 times that of double would be great. :-)

Another question: Did you change the bessel functions already? Because I get a slightly different result since the update.

Thanks.
I am sorry but I can not give you the complete code. I will try to make some minimal examples of routines which take the most time. But I guess one part will be the call of functions which have mp values as input and mp values inside the function.
Hello.

Thanks for the update.
I used the new version to build my system of equations A*x=b and it was about two times faster than before. (old 1100 seconds, new 540 seconds) The time to build the system in double precision is around 4 seconds. I do like 1.5 million function evalutions of nested functions with vectors of the length 2000. I get a slightly different result compared to the old version, but i will check again if I do not have an error here.
The bug is not appearing when simple double values are used.

Example:

a = (1:200)';
b=a(101:200);
c=a(1:100);
d = [b;c];

Since vpa values can't be viewed at all in the variable editor I can't use them for comparing in this issue. I don't know how you managed it to show mp values at all in the variable editor. :-)


Kundesupport af UserEcho