Enter forum description here ...
0
Not a bug

Wrong display of arrays after vertical concatenation

Michael_ 9 years ago updated by Pavel Holoborodko 9 years ago 5
Hello.

There is a bug in the display of arrays after a vertical concatenation. (Matlab 2014b)

Example:

mp.Digits(34)
a=(1:100)';
b=mp(a(1:50));
c=mp(a(51:100));
d=[b;c];

If you view the variable d in the variable editor it shows the wrong numbers after the 65th entry. If you check it in the command window it is correct.
0
Answered

meshgrid and ndgrid support

Varun Shankar 11 years ago updated by Pavel Holoborodko 11 years ago 2

Does the MCT support meshgrid and/or ndgrid in multiprecision? I've been using these in my programs with the mp type, but I wanted to check anyway.

0
Fixed

Output of disp

Stefan Güttel 9 years ago updated by Pavel Holoborodko 9 years ago 3
Hi Pavel,

we have observed the following "bug" (or rather inconsistency) in the formatting of the output via DISP:

Standard MATLAB code with output:
>> disp(1)
1
MP version:
>> disp(mp(1))
x =
1
There should be no x. As mp(1) pruduces no "x =", the bug must be in disp.
Another inconsistency with MATLAB output formatting concerns format compact. One would expect a reduced amount of space when it is turned on, which appears not to be the case with mp.
>> format compact
>> 1
ans =
1
>> disp(1)
1
>> mp(1)
ans =
1
>> disp(mp(1))
x =
1
Cheers,
Mario Berljafa & Stefan Guettel

0
Answered

Does matrix multiplication use multiple cores?

Michael_ 9 years ago updated by Pavel Holoborodko 8 years ago 15
Hello Pavel.

I was wondering if you updated the software to use multiple cores in case of matrix multiplication. I read something about it in the change log, but it seems to me it still uses 1 core all the time.

Thank you.

Best regards,

Michael
0
Answered

Definite integrals with mp-objects

Jeremy 8 years ago updated by Pavel Holoborodko 8 years ago 10

Hello,


Is there a possibility to calculate definite integrals of sum of products of sines/cosines with cosh/sinh with mp-objects?


Kind regards,


Jeremy

0
Completed

Trial version does not work.

Paul 8 years ago updated by Pavel Holoborodko 8 years ago 1

Says it is expired on first use.

0
Answered

Read and write performance in arrays

Michael_ 9 years ago updated by Pavel Holoborodko 9 years ago 15
Hello.

Following example:

Double values:
A=zeros(6000,6000);
tic
for ii = 1:6000
for jj = 1:6000
A(ii,jj)=1.234;
end
end
toc
Elapsed time is 2.038870 seconds

Now without defining A before the for-loop
tic
for ii = 1:6000
for jj= 1:6000
A(ii,jj)=1.234;
end
end
toc
Elapsed time is 120.038870 seconds

Of course the performance is better if I define the array in advance.

Now the same for an mp array with 34 digits:
A=mp(zeros(200,200));
tic
for ii =1:200
for jj = 1:200
A(ii,jj)=mp('1.234');
end
end
toc
Elapsed time is 22.309700 seconds.

Now without defining A before the for-loop
tic
for ii =1:200
for jj = 1:200
A(ii,jj)=mp('1.234');
end
end
toc
Elapsed time is 14.581011 seconds.

How is this possible? This even becomes worse if the matrix is bigger.

Thanks for your answer.
0
Answered

input multiprecision values

Gleb Beliakov 10 years ago updated by Pavel Holoborodko 9 years ago 2
Hi, how do I input/read from a file multiprecsion values (calculated elsewhere) into mp objects?
0
Fixed

Inconsistency in handling division by zero

Ash 8 years ago updated by Pavel Holoborodko 8 years ago 2

Using double precision:

>> 1/0

ans =

Inf

And :

>> 0^(-1)

ans =
Inf

The results should be consistent using either method as shown above. However, using quad precision, these computations do not give consistent results:

>> 1/mp(0)

ans =
Inf
>> mp(0)^(-1)
ans =
Inf - NaNi

I'm not sure what's under the hood, but it seems to me that either computation should give the same answer.

0
Fixed

error LU function (the devil is in the details)

john doe 9 years ago updated by Pavel Holoborodko 9 years ago 7
%% test_lu
clear all %#ok<*CLSCR>
clc
mem = memory %#ok<*NASGU,*NOPTS>

tic, [l,u,p] = lu(9), toc %#ok<*ASGLU>
% now do this...
tic, [l,u,p] = lu(mp(9)), toc
... and look at differences ...
mem = memory
% ... wait for while ( for me about 10..40 sec, randomly !)

% ...
% and then I get out of memory error window

... here is my output ...

mem =

MaxPossibleArrayBytes: 3.3001e+09
MemAvailableAllArrays: 3.3001e+09
MemUsedMATLAB: 735469568


l =

1


u =

9


p =

1

Elapsed time is 0.024654 seconds.

l =

{3x1 cell}
{3x1 cell}
[ 0]


u =

{3x1 cell}
{3x1 cell}
[ 0]


p =

0

Elapsed time is 2.856406 seconds.

mem =

MaxPossibleArrayBytes: 3.2757e+09
MemAvailableAllArrays: 3.2757e+09
MemUsedMATLAB: 760942592

>> mp.Info
-------------------------------------------------------------------------------------------------------------
Multiprecision Computing Toolbox, (c) 2008-2015 Advanpix LLC.
Version : 3.8.4 Build 8915
Platform: 64-bit (Win64)
Release : 2015-07-22

P.S.
I reduced the virtual machine's memory to 1G and get much faster now out of memory

P.S. #2
L = lu(mp(9)) % Matlab crash