integers .*. floats yields floats instead of integers: This is not consistent with .* and * behaviors
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
When multiplying encoded integers with decimal numbers, the result is historically yielded as encoded integers:
--> uint8(1:4) .* [3.2 4.7 1.3 2]
ans =
3 8 3 8
--> uint8(1:4) * 2.9
ans =
2 4 6 8
However, the kronecker product -- that is basically an iterated product -- inconsistently yields floats instead:
--> uint8(1:4) .*. [1.2 2.3]
ans =
1.2 2.3 2.4 4.6 3.6 6.9 4.8 9.2
--> [1.2 2.3] .*. uint8(1:4)
ans =
1.2 2.4 3.6 4.8 2.3 4.6 6.9 9.2
ERROR LOG:
----------
none. Inconsistent type of result.
HOW TO REPRODUCE THE BUG:
-------------------------
typeof(uint8(1:4) .*. [1.2 2.3])=="uint8"
typeof([1.2 2.3] .*. uint8(1:4))=="uint8"
OTHER INFORMATION:
------------------