Fix polynomials display. 07/14807/2
Vincent COUVERT [Fri, 4 Jul 2014 11:42:54 +0000 (13:42 +0200)]
Modification according to https://codereview.scilab.org/#/c/4731/

To test: test_run output_stream bug_8874

Change-Id: Ia941e9153df6f92cb3542acbffbd3dbdb6675108

scilab/modules/output_stream/src/fortran/dmpdsp.f
scilab/modules/output_stream/tests/nonreg_tests/bug_8874.dia.ref

index ceb74ab..afdb506 100644 (file)
@@ -111,7 +111,7 @@ c     determination du format devant representer a
                   iw(ldef)=n2+32*n1
                elseif(typ.lt.0) then
                   iw(ldef)=typ
-                  fl=4
+                  fl=5
                else
                   iw(ldef)=1
                   fl=maxc
@@ -217,7 +217,7 @@ c
                      fl=n1
                   elseif(ifmt.lt.0) then
 c     Inf/Nan
-                     fl=3
+                     fl=4
                      n2=1
                   endif
 c
index f097b0e..2262211 100644 (file)
@@ -85,13 +85,13 @@ P
 Real part
 
  
-                2       
-  - 1 + s + Infs + Nans 
+                2      3  
+  - 1 + s + Infs + Nans   
 Imaginary part
 
  
-                     2      3  
-    Inf + Nans + Nans + Nans   
+                     2      3      
+    Inf + Nans + Nans + Nans       
 format("e")
 // Check string
 assert_checkequal(string(complex(0,%inf)),"%i*Inf");
@@ -156,10 +156,10 @@ P
 Real part
 
  
-                                 2      3  
-  - 1.000D+00 + 1.000D+00s + Infs + Nans   
+                                 2      3    
+  - 1.000D+00 + 1.000D+00s + Infs + Nans     
 Imaginary part
 
  
-                     2      3  
-    Inf + Nans + Nans + Nans   
+                     2      3      
+    Inf + Nans + Nans + Nans