@@ -88,6 +88,36 @@ tape( 'the function computes the cumulative sum of a one-dimensional ndarray', f
8888 t . strictEqual ( v , y , 'returns expected value' ) ;
8989 t . strictEqual ( isSameFloat32Array ( getData ( v ) , expected ) , true , 'returns expected value' ) ;
9090
91+ xbuf = new Float32Array ( [ - 0.0 , 0.0 , - 0.0 ] ) ;
92+ x = vector ( xbuf , 3 , 1 , 0 ) ;
93+ y = zerosLike ( x ) ;
94+ initial = scalar2ndarrayLike ( x , - 0.0 ) ;
95+ v = scusumpw ( [ x , y , initial ] ) ;
96+
97+ expected = new Float32Array ( [ 0.0 , 0.0 , 0.0 ] ) ;
98+ t . strictEqual ( v , y , 'returns expected value' ) ;
99+ t . strictEqual ( isSameFloat32Array ( getData ( v ) , expected ) , true , 'returns expected value' ) ;
100+
101+ xbuf = new Float32Array ( [ - 0.0 , - 0.0 , - 0.0 ] ) ;
102+ x = vector ( xbuf , 3 , 1 , 0 ) ;
103+ y = zerosLike ( x ) ;
104+ initial = scalar2ndarrayLike ( x , - 0.0 ) ;
105+ v = scusumpw ( [ x , y , initial ] ) ;
106+
107+ expected = new Float32Array ( [ 0.0 , 0.0 , 0.0 ] ) ;
108+ t . strictEqual ( v , y , 'returns expected value' ) ;
109+ t . strictEqual ( isSameFloat32Array ( getData ( v ) , expected ) , true , 'returns expected value' ) ;
110+
111+ xbuf = new Float32Array ( [ - 0.0 , - 0.0 , - 0.0 ] ) ;
112+ x = vector ( xbuf , 3 , 1 , 0 ) ;
113+ y = zerosLike ( x ) ;
114+ initial = scalar2ndarrayLike ( x , 0.0 ) ;
115+ v = scusumpw ( [ x , y , initial ] ) ;
116+
117+ expected = new Float32Array ( [ 0.0 , 0.0 , 0.0 ] ) ;
118+ t . strictEqual ( v , y , 'returns expected value' ) ;
119+ t . strictEqual ( isSameFloat32Array ( getData ( v ) , expected ) , true , 'returns expected value' ) ;
120+
91121 xbuf = new Float32Array ( [ NaN ] ) ;
92122 x = vector ( xbuf , 1 , 1 , 0 ) ;
93123 y = zerosLike ( x ) ;
0 commit comments