BUG DESCRIPTION:
----------------
With Scilab 5.5.2:
=================
-->sci2exp(rand(2,2,2)<0) // Hypermat of booleans
ans =
mlist(["hm","dims","entries"],int32([2,2,2]),[%f;%f;%f;%f;%f;%f;%f;%f])
-->sci2exp(rand(2,2,2)) // Hypermat of decimal numbers
ans =
mlist(["hm","dims","entries"],int32([2,2,2]),[0.2113249;0.7560439;0.0002211;0.3303271;0.6653811;0.6283918;0.
8497452;0.6857310])
-->sci2exp(int8(rand(2,2,2)*100)) // Hypermat of integers
ans =
mlist(["hm","dims","entries"],int32([2,2,2]),int8([36;29;56;48;33;59;50;43]))
-->sci2exp(struct("r",%pi,"b",%t,"t","Test", "p", (1-%z)^2)) // Simple structure
ans =
mlist(["st","dims","r","b","t","p"],int32([1,1]),3.1415927,%t,"Test",1-2*z+z^2)
-->c = makecell([2 2],%t,"Test",(1-%z)^2, %pi) // Cells array:
c =
!%t "Test" !
! !
!1-2*z+z^2 3.1415927 !
-->sci2exp(c)
ans =
mlist(["ce","dims","entries"],int32([2,2]),list(%t,1-2*z+z^2,"Test",3.1415927))
With Scilab 6.0.0:
=================
--> sci2exp(rand(2,2,2)<0) // Hypermat of booleans
at line 6 of function log2exp ( SCI\modules\string\macros\sci2exp.sci line 397 )
at line 48 of function sci2exp ( SCI\modules\string\macros\sci2exp.sci line 60 )
matrix: Input and output matrices must have the same number of elements.
--> sci2exp(rand(2,2,2)) // Hypermat of decimal numbers
ans =
[0.36163610080257058,0.56642488157376647;0.29222666379064322,0.48264719732105732] <<< pages #>1 missing
--> sci2exp(int8(rand(2,2,2)*100)) // Hypermat of integers
ans =
int8([26,40;63,91]) <<< pages #>1 missing
--> sci2exp(struct("r",%pi,"b",%t,"t","Test", "p", (1-%z)^2))
ans =
mlist(["st","dims","r","b","t","p"]) <<< Values missing
--> c = makecell([2 2],%t,"Test",(1-%z)^2, %pi)
c =
[1x1 boolean ] [1x1 string ]
[1x1 polynomial] [1x1 constant]
--> sci2exp(c)
at line 12 of function glist2exp ( SCI\modules\string\macros\sci2exp.sci line 353 )
at line 2 of function mlist2exp ( SCI\modules\string\macros\sci2exp.sci line 389 )
at line 84 of function sci2exp ( SCI\modules\string\macros\sci2exp.sci line 96 )
getfield: Wrong type for input argument #2: List expected.
ERROR LOG:
----------
Please see here-above. Wrong answers
HOW TO REPRODUCE THE BUG:
-------------------------
sci2exp(rand(2,2,2)<0)
sci2exp(rand(2,2,2))
sci2exp(int8(rand(2,2,2)*100))
sci2exp(struct("r",%pi,"b",%t,"t","Test", "p", (1-%z)^2))
c = makecell([2 2],%t,"Test",(1-%z)^2, %pi)
sci2exp(c)
OTHER INFORMATION:
------------------
sci2exp() is rather heavily used in Scilab. => At least a major regression