-- Bug description --
cumsum(sparse) returns a heavy sparse-coded dense-like result. It should return either cumsums only at non-zero inputs, in sparse format ; or a dense matrix (for consistency with functions like cos(sparse) where zero entries become non-zero).
-- Scilab error message --
-->s=sparse([1 0 2 0 0 ; 0 -4 0 0 7 ])
s =
( 2, 5) sparse matrix
( 1, 1) 1.
( 1, 3) 2.
( 2, 2) - 4.
( 2, 5) 7.
-->cumsum(s)
ans =
( 2, 5) sparse matrix
( 1, 1) 1.
( 1, 2) 1.
( 1, 3) - 1.
( 1, 4) - 1.
( 1, 5) - 1.
( 2, 1) 1.
( 2, 2) - 3.
( 2, 3) - 1.
( 2, 4) - 1.
( 2, 5) 6.
-->cos(s)
ans =
0.5403023 1. - 0.4161468 1. 1.
1. - 0.6536436 1. 1. 0.7539023
-->sin(s)
ans =
( 2, 5) sparse matrix
( 1, 1) 0.8414710
( 1, 3) 0.9092974
( 2, 2) 0.7568025
( 2, 5) 0.6569866
-- How to reproduce the bug --
s = sparse([1 0 2 0 0 ; 0 -4 0 0 7 ])
cumsum(s)
cos(s)
sin(s)