[Bugzilla] [Bug 13822] New: strong regression with linear system solving
bugzilla.admin at scilab.org
bugzilla.admin at scilab.org
Sat Apr 11 22:49:09 CEST 2015
http://bugzilla.scilab.org/show_bug.cgi?id=13822
--------- Bug Summary -----------
strong regression with linear system solving
---------- Changed by ------------
marc.derumaux at free.fr
---------- What changed ----------
bug_id, short_desc, product, version, rep_platform, op_sys, bug_status, bug_severity, priority, component, assigned_to, reporter
Bug ID: 13822
Summary: strong regression with linear system solving
Product: Scilab software
Version: 5.5.2 final version
Hardware: PC
OS: All OS
Status: NEW
Severity: Major
Priority: P5
Component: Scilab
Assignee: bugzilla.admin at scilab.org
Reporter: marc.derumaux at free.fr
BUG DESCRIPTION:
----------------
A=M\B operation gives wrong result and warn for bad conditionning on 5.5.1 and 5.5.2 version.
Same test case on 5.4.1 version works perfectly, with same result as python/numpy.
ERROR LOG:
----------
Attention :
La matrice est presque singulière ou mal conditionnée. rcond = 2.3968D-19
HOW TO REPRODUCE THE BUG:
-------------------------
I discovered that bug by working on an old code that did work, and do not on 5.5.1 and 5.5.2. The code should solve a mean square approximation based
on polynomes.
I could make a test case pretty simple to try :
// cas simplifié faisant apparaitre le bug
h=[0. 2. 4. 6. 8. 10. 12. 14. 16. 18. 20. ]
press =[ 0.988 0.774 0.608 0.466 0.351 0.261 0.191 0.139 0.102 0.074 0.0545]
n=6;
M=[]
B=[]
for j=1:n+1
for i=1:n+1
M(j,i)=sum(h.^(i-1).*h.^(j-1));
end
B(j)=sum(h.^(j-1).*press);
end
// Résolution du système
A=M\B
// Calcul de la courbe approximée (évaluation du polynome)
y=0;
for i=0:n
y=y+A(i+1)*h.^i;
end
// Tracé de la courbe polynomiale
figure(1);clf
plot(h,press,"+r");
plot(h,y,"k")
This code will work perfectly on 5.4.1, and gives wrong result on 5.5.2.
For n=4 only, result is OK on 5.5.2.
Same problem if the code is launch with h=h*1000 : Ok on 5.4.1 and bad result for 5.5.2 except for n=2 !
Is it a 32 bits float type used for calculation ?
OTHER INFORMATION:
------------------
--
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/bugzilla/attachments/20150411/f7c1bd5c/attachment.htm>
More information about the Bugzilla
mailing list