Skip to content

Commit fd656e1

Browse files
committed
test: add case for mean function to return NaN when inputs are zero
1 parent e615843 commit fd656e1

File tree

1 file changed

+3
-0
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/cosine/mean/test

1 file changed

+3
-0
lines changed

lib/node_modules/@stdlib/stats/base/dists/cosine/mean/test/test.native.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ tape( 'if provided `s <= 0.0`, the function returns `NaN`', opts, function test(
7070
y = mean( 2.0, -2.0 );
7171
t.equal( isnan( y ), true, 'returns NaN' );
7272

73+
y = mean( 0.0, 0.0 );
74+
t.equal( isnan( y ), true, 'returns NaN' );
75+
7376
y = mean( NINF, NINF );
7477
t.equal( isnan( y ), true, 'returns NaN' );
7578

0 commit comments

Comments
 (0)