0
Fixed

R2019b linux problem

Michal Kvasnicka 5 years ago updated by Pavel Holoborodko 4 years ago 14

On R201b (Linux Mint 19.2) is the following problem:

>> mp.Test
mp.Digits() : <- success
mp.GuardDigits() : <- success
double() : <- success
int8() : <- success
uint8() : <- success
int16() : <- success
uint16() : <- success
int32() : <- success
uint32() : <- success
int64() : <- success
uint64() : <- success
colon() : <- success
plus() : <- success
minus() : <- success
times() : <- success
mtimes() : <- success
rdivide() : <- success
ldivide() : <- success
mldivide() : <- success
mrdivide() : <- success
mpower() : <- success
power() : <- success
realpow() : <- success
transpose() : <- success
ctranspose() : <- success
uminus() : <- success
uplus() : <- success
sin() : <- success
cos() : <- success
tan() : <- success
sec() : <- success
csc() : <- success
cot() : <- success
acos() : <- success
asin() : <- success
atan() : <- success
acot() : <- success
atan2() : <- success
hypot() : <- success
cosh() : <- success
sinh() : <- success
tanh() : <- success
sech() : <- success
csch() : <- success
coth() : <- success
acosh() : <- success
asinh() : <- success
atanh() : <- success
acoth() : <- success
asech() : <- success
acsch() : <- success
exp() : <- success
expm1() : <- success
log() : <- success
log10() : <- success
log1p() : <- success
log2() : <- success
nextpow2() : <- success
pow2() : <- success
sqrt() : <- success
reallog() : <- success
realsqrt() : <- success
nthroot() : <- success
pow2(F,E) : <- success
min(), max() : <- success
prod(matrix) : <- success
prod(vector) : <- success
sum(matrix) : <- success
sum(vector) : <- success
cumsum(matrix) : <- success
cumsum(vector) : <- success
cumprod(matrix) : <- success
cumprod(vector) : <- success
dot() : <- success
cross() : 2 <- fail
3 <- fail
9 <- fail
10 <- fail
<- success
svd() : <- success
qr() : <- success
lu(square) : <- success
lu(rect) : <- success
pinv() : <- success
null() : <- success
balance() : <- success
eig() : <- success
qz() : <- success
hess() : <- success
chol() : <- success
schur() : <- success
ordschur() : <- success
rank() : <- success
trace() : <- success
det() : <- success
inv() : <- success
sort(real) : <- success
sort(complex) : <- success
find() : <- success
<,<=,>,>=,==,~= : <- success
and,or,not,xor : <- success
all() : <- success
any() : <- success
isinf() : <- success
isnan() : <- success
isfinite() : <- success
isreal() : <- success
abs() : <- success
sign() : <- success
conj() : <- success
angle() : <- success
imag() : <- success
real() : <- success
complex() : <- success
ceil() : <- success
fix() : <- success
floor() : <- success
idivide() : <- success
round() : <- success
rem() : <- success
mod() : <- success
tril(matrix) : <- success
tril(vector) : <- success
triu(matrix) : <- success
triu(vector) : <- success
diag(matrix) : <- success
diag(vector) : <- success
norm(matrix) : <- success
norm(vector) : <- success
cond() : <- success
rcond() : <- success
factorial() : <- success
mean() : <- success
std() : <- success
erf() : <- success
erfc() : <- success
erfi() : <- success
FresnelS() : <- success
FresnelC() : <- success
gammaln() : <- success
gamma() : <- success
gammainc() : <- success
psi() : <- success
zeta() : <- success
eint() : <- success
logint() : <- success
cosint() : <- success
sinint() : <- success
besselj() : <- success
bessely() : <- success
besseli() : <- success
besselk() : <- success
besselh() : <- success
hypergeom() : <- success
KummerM() : <- success
KummerU() : <- success
expm() : <- success
logm() : <- success
sqrtm() : <- success
sinm() : <- success
cosm() : <- success
sinhm() : <- success
coshm() : <- success
fft : <- success
ifft : <- success
fft2 : <- success
ifft2 : <- success

I mean Matlab R2019b ... sorry for typo

Under review

Looking into this.

Thank you!

TMW changed the functionality of "cross" function in R2019b for complex vectors.

< R1019b:

    % Calculate cross product
c = [a(2).*b(3)-a(3).*b(2);
a(3).*b(1)-a(1).*b(3);
a(1).*b(2)-a(2).*b(1)];


>= R2019b:

    % Calculate cross product
c1 = conj(a(2).*b(3)-a(3).*b(2));
c2 = conj(a(3).*b(1)-a(1).*b(3));
c3 = conj(a(1).*b(2)-a(2).*b(1));

if iscolumn(a) && iscolumn(b)
c = [c1; c2; c3];
else
c = [c1, c2, c3];
end

Second one seems to be mathematically more correct. But if we follow this, toolbox would fail on older MATLAB versions.

Have to rewrite the function to support both :(.


In any case, just ignore the error, we will release new bundle soon with workaround.  

Fixed

Just re-download and use 4.6.4.13348 version. 

I have just added support for "cross" from R2019b.

Thanks for fast fix!!!

Similar problem with R2019b_update3 ... (only Windows platform tested so far)

cross() : 2 <- fail
3 <- fail
9 <- fail
10 <- fail
<- success

Looks like TWM just fixed the bug they introduced in initial release of R2019b.

While I am installing it, could you please share code of cross.m distributed with Update 3 (email or here)?

Strange, the "cross.m" was not changed in Update 3. What version of toolbox do you use on Windows? 

Please update it if it is too old.

= R2019b:

    % Calculate cross product
c1 = conj(a(2).*b(3)-a(3).*b(2));
c2 = conj(a(3).*b(1)-a(1).*b(3));
c3 = conj(a(1).*b(2)-a(2).*b(1));

if iscolumn(a) && iscolumn(b)
c = [c1; c2; c3];
else
c = [c1, c2, c3];
end


= R2019b_update3:

   % Calculate cross product
    c1 = a(2).*b(3)-a(3).*b(2);
    c2 = a(3).*b(1)-a(1).*b(3);
    c3 = a(1).*b(2)-a(2).*b(1);
    
    if iscolumn(a) && iscolumn(b)
        c = [c1; c2; c3];
    else
        c = [c1, c2, c3];
    end

>> mp.Info

-------------------------------------------------------------------------------------------------------------

Multiprecision Computing Toolbox, (c) 2008-2019 Advanpix LLC.

Version : 4.7.0 Build 13560

Release : 2019-11-06

Platform : Win64

Processor: Lynnfield (Core i7) / Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz

MachineID: =CD00FF5FEA5F98CD00155D11736DCD6C626D57F933CD0A002700000DCD00FF415B375DAC2465FDC0FC95318A5F4D4B630C0C50B0=

Licensed to: Michal Kvasnicka

Maintenance: 2020-01-20

Open Source Libraries Acknowledgements:

MPIR 3.0.0 C Library for Multiple Precision Integers and Rationals.

MPFR 4.1.0-dev C Library for Multiple-Precision Floating-point computations with correct Rounding.

MPC 1.1.1dev C Library for the Arithmetic of Complex numbers with arbitrary high precision.

ARB 2.17.0 C library for arbitrary-precision ball arithmetic.

MPFR C++ 3.6.6 C++ multi-precision floating point number class.

Eigen 3.2.90 C++ template library for linear algebra.

QRUPDATE 1.1.2 Library for fast updating of QR and Cholesky decompositions.

SLICOT 5.5.0 The Control and Systems Library.

LIBCPUID 0.4.0 CPU identification and feature extraction on the x86.

Boost 1.49.0 Free peer-reviewed portable C++ source libraries.

-------------------------------------------------------------------------------------------------------------

Oh, I see the difference now, thank you (never check mails on the go...).

So, TWM added conjugation to cross function in R2019b. 

In Update 3 they reverted it back to pre-R2019b state (without conjugation).


Will add workaround in next version of toolbox.

Thank you for the report.

When will be available next release with fixed cross product function?

This is confirmed bug in MATLAB R2019b, see bug-report: https://www.mathworks.com/support/bugreports/details/2088279 

I have just updated toolbox bundle for GNU Linux to cope with this mess from TMW. Please re-download toolbox one more time.

Now it includes only proper version of cross, compatible with pre-R2019b and post-R2019b Update 2.

And it is removed from mp.Test to avoid confusion with R2019b.