Enter forum description here ...
0
Not a bug

Error in contourf plots

Michael_ 6 years ago updated 6 years ago 2

Hello Pavel.

There are some problems with contourf plots "contourf(X,Y,Z,v)" and multiprecision data. Setting the different levels with the parameter "v" does not work properly using multi-precision data. Furthermore using caxis(limits) with multiprecision data leads to an error.


Best regards,

Michael

0
Answered

mp linprog support

Michal Kvasnicka 6 years ago updated 4 years ago 4

Is there any possibility to use matlab function linprog with mp class?

0
Fixed

Airy Functions of Imaginary Argument

Tom Wallace 6 years ago updated by Pavel Holoborodko 6 years ago 2

There appears to be an error in computing the values of Airy functions and their derivatives of purely imaginary argument unless z is exactly 0. For example:


>> z = 1i; [ airy(0, z) airy(1, z) airy(2, z) airy(3, z) ].'

ans =

          0.331493305432141 -     0.317449858968444i
         -0.432492659841807 +    0.0980478562292432i
          0.648858208330395 +     0.344958634768048i
          0.135026646710819 -     0.128837386781255i

>> z = mp('1i'); [ airy(0, z) airy(1, z) airy(2, z) airy(3, z) ].'

ans =

        0    
        0    
        0    
        0  

This bug seems to affect only values of z with exactly zero real part:


>> z = mp('1e-100+1i'); [ airy(0, z) airy(1, z) airy(2, z) airy(3, z) ].'

ans =

         0.3314933054321411889845293326171343 -      0.3174498589684437734776429279092585i    
        -0.4324926598418070993062086217182285 +     0.09804785622924323238379104639440311i    
          0.648858208330394944584847653172865 +      0.3449586347680483702471086086672932i    
         0.1350266467108189726991698591958052 -       0.128837386781254879039817640967921i


Mathematica, for comparison


In[9]:= N[ { AiryAi[I], D[AiryAi[x], x] /. x -> I,  AiryBi[I],  D[AiryBi[x], x] /. x -> I }, 34]

Out[9]= {0.3314933054321411889845293326171343 -   0.3174498589684437734776429279092585 I,
-0.4324926598418070993062086217182286 +   0.0980478562292432323837910463944031 I,
 0.6488582083303949445848476531728650 +   0.3449586347680483702471086086672933 I,
 0.1350266467108189726991698591958051 -   0.1288373867812548790398176409679211 I}



0
Answered

new releases policy

Michal Kvasnicka 6 years ago updated by Pavel Holoborodko 6 years ago 2

There are obviously new releases for Windows during last few days, but not the same releases (relevant to same bug)  for Linux or OSX.


What is exactly the new releases policy? When will be available latest releases for Linux?

0
Fixed

Error using mp/subsasgn: Subscripted assignment dimension mismatch.

Jon Vegard 6 years ago updated by Manolis Chatzis 3 years ago 13

The following subscript assignment works fine in MATLAB, but not with the MP-toolbox. Obviously workaround exists, but this type of assignments are truly convenient.

A = zeros(3,3,3);
B = ones(3,1);
A(1,1,:) = B;

A = zeros(3,3,3,'mp');
B = ones(3,1,'mp');
A(1,1,:) = B;

0
Not a bug

exp() speed windows vs linux comparison

Michal Kvasnicka 6 years ago updated by Pavel Holoborodko 6 years ago 5

Hi I am trying to compare latest versions MCT exp() speed on two platforms (windows and linux). 

Windows:

Windows 7 Pro 64bit, Matlab R2017b, MCT 4.4.4 Build 12668

Linux:

Ubuntu 16.04.3 64bit, Matlab R2017b, MCT 4.4.4 Build 12666


I found very strange results:


rng(1), n = 1000;
A = randn(n); A_mp = mp(A,34);

t = clock; X = exp(A);     t_dp = etime(clock, t)
t = clock; X = exp(A_mp);  t_mp = etime(clock, t)


Windows:

t_dp =

    0.0260

t_mp =

    0.0550


Linux:

t_dp =

    0.0065

t_mp =

    0.2184


Windows and Linux PC has different HW (Linux PC is significantly faster ... see double precision timing), but on linux is quadruple precision computing significantly slower.


Is there some bug in Linux release?



0
Completed

Overload element-wise operators

Jason Nicholson 6 years ago updated by Pavel Holoborodko 5 years ago 4

I think element-wise operators need overloaded. Here is an example of why. With double precision in MATLAB, this works. I think it should work for the mp data type too.


>> x = 1:10, y = (11:20)'

x =

     1     2     3     4     5     6     7     8     9    10

y =

    11
    12
    13
    14
    15
    16
    17
    18
    19
    20

>> A = x.*y

A =

    11    22    33    44    55    66    77    88    99   110
    12    24    36    48    60    72    84    96   108   120
    13    26    39    52    65    78    91   104   117   130
    14    28    42    56    70    84    98   112   126   140
    15    30    45    60    75    90   105   120   135   150
    16    32    48    64    80    96   112   128   144   160
    17    34    51    68    85   102   119   136   153   170
    18    36    54    72    90   108   126   144   162   180
    19    38    57    76    95   114   133   152   171   190
    20    40    60    80   100   120   140   160   180   200

>> A = mp(x).*mp(y)
Error using  .*  (line 1644)
Matrix dimensions must agree




0
Answered

How would you use mp on a GPU?

Abhranil Das 7 years ago updated by Pavel Holoborodko 7 years ago 3

This page says about fast quadruple precision:


'...this allows more efficient usage of hardware capabilities of modern CPUs, even exploiting some of the advanced instructions, not to mention possibilities of harnessing power of the GPU!'

I've been trying to use mp to solve the example singular value decomposition problem (illustrated on the same page) on an NVIDIA Quadro 2000 GPU that I've successfully used MATLAB's gpu functions on. I try the following code:


mp.Digits(34); mp.GuardDigits(0); format longG
A = gpuArray.rand(1000);
X = mp(A); tic; [U,S,V] = svd(X); toc;


But on encountering line 3 MATLAB says:


Error using mp: unsupported argument type


This is probably because the argument I'm passing to mp is a GPU array that it doesn't know how to handle.


How can I get mp to do this?


0
Answered

How to accelerate the advanpix code ?!

SomeOne 7 years ago updated by Pavel Holoborodko 7 years ago 6

Hello! is there anyway to accelerate the advanpix code , it takes too long time to run, any suggestions ?!

0
Completed

Support for IEEE 754 octuple precision

ginette machin 7 years ago updated by Pavel Holoborodko 7 years ago 5

Advanpix already allows the declaration of quadruple precision as in the  IEEE 754 standard. 

It would be great to do the same with octuple precision since it is defined by this standard. 

My point here is not speed, but to test algorithms with this peculiar precision in a quite portable way.