Skip to content

Commit 64ab273

Browse files
fix: test errors
1 parent 4d1fe59 commit 64ab273

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

lib/node_modules/@stdlib/math/base/special/ceil2f/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ var i;
9292

9393
for ( i = 0; i < 100; i++ ) {
9494
x = (randu()*100.0) - 50.0;
95-
v = ceil2f( x );
9695
console.log( 'x: %d. Rounded: %d.', x, v );
9796
}
9897
```

lib/node_modules/@stdlib/math/base/special/ceil2f/benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ var resolve = require( 'path' ).resolve;
2424
var bench = require( '@stdlib/bench' );
2525
var randu = require( '@stdlib/random/base/randu' );
2626
var isnan = require( '@stdlib/math/base/assert/is-nan' );
27-
var pkg = require( './../package.json' ).name;
2827
var tryRequire = require( '@stdlib/utils/try-require' );
28+
var pkg = require( './../package.json' ).name;
2929

3030

3131
// VARIABLES //

lib/node_modules/@stdlib/math/base/special/ceil2f/test/test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,22 +97,22 @@ tape( 'the function overflows if provided a sufficiently large positive value',
9797
t.end();
9898
});
9999

100-
tape( 'the function supports rounding large values', function test( t ) {
100+
tape( 'the function supports rounding large values', opts, function test( t ) {
101101
var x;
102102
var v;
103103

104104
x = -exp2( 1023 );
105105
v = ceil2f( x + (x/2.0) );
106-
t.strictEqual( v, x, 'returns expected value' );
106+
t.strictEqual( v, x, 'returns -infinity' );
107107

108108
x = -exp2( 1023 );
109109
v = ceil2f( x + (x/3.0) );
110-
t.strictEqual( v, x, 'returns expected value' );
110+
t.strictEqual( v, x, 'returns -infinity' );
111111

112112
t.end();
113113
});
114114

115-
tape( 'the function supports rounding subnormal values', function test( t ) {
115+
tape( 'the function supports rounding subnormal values', opts, function test( t ) {
116116
var expected;
117117
var x;
118118
var v;
@@ -121,21 +121,21 @@ tape( 'the function supports rounding subnormal values', function test( t ) {
121121

122122
x = pow( 2.0, -1045 );
123123
v = ceil2f( x + (x/2.0) );
124-
t.strictEqual( v, expected, 'returns expected value' );
124+
t.strictEqual( v, expected, 'returns +0' );
125125

126126
x = pow( 2.0, -1045 );
127127
v = ceil2f( x + (x/3.0) );
128-
t.strictEqual( v, expected, 'returns expected value' );
128+
t.strictEqual( v, expected, 'returns +0' );
129129

130130
expected = -pow( 2.0, -1045 );
131131

132132
x = -pow( 2.0, -1045 );
133133
v = ceil2f( x + (x/2.0) );
134-
t.strictEqual( v, expected, 'returns expected value' );
134+
t.strictEqual( v, expected, 'returns +0' );
135135

136136
x = -pow( 2.0, -1045 );
137137
v = ceil2f( x + (x/3.0) );
138-
t.strictEqual( v, expected, 'returns expected value' );
138+
t.strictEqual( v, expected, 'returns +0' );
139139

140140
t.end();
141141
});

lib/node_modules/@stdlib/math/base/special/ceil2f/test/test.native.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ tape( 'the function supports rounding large values', opts, function test( t ) {
112112

113113
x = -exp2( 1023 );
114114
v = ceil2f( x + (x/2.0) );
115-
t.strictEqual( v, x, 'returns expected value' );
115+
t.strictEqual( v, x, 'returns -infinity' );
116116

117117
x = -exp2( 1023 );
118118
v = ceil2f( x + (x/3.0) );
119-
t.strictEqual( v, x, 'returns expected value' );
119+
t.strictEqual( v, x, 'returns -infinity' );
120120

121121
t.end();
122122
});
@@ -130,21 +130,21 @@ tape( 'the function supports rounding subnormal values', opts, function test( t
130130

131131
x = pow( 2.0, -1045 );
132132
v = ceil2f( x + (x/2.0) );
133-
t.strictEqual( v, expected, 'returns expected value' );
133+
t.strictEqual( v, expected, 'returns +0' );
134134

135135
x = pow( 2.0, -1045 );
136136
v = ceil2f( x + (x/3.0) );
137-
t.strictEqual( v, expected, 'returns expected value' );
137+
t.strictEqual( v, expected, 'returns +0' );
138138

139139
expected = -pow( 2.0, -1045 );
140140

141141
x = -pow( 2.0, -1045 );
142142
v = ceil2f( x + (x/2.0) );
143-
t.strictEqual( v, expected, 'returns expected value' );
143+
t.strictEqual( v, expected, 'returns +0' );
144144

145145
x = -pow( 2.0, -1045 );
146146
v = ceil2f( x + (x/3.0) );
147-
t.strictEqual( v, expected, 'returns expected value' );
147+
t.strictEqual( v, expected, 'returns +0' );
148148

149149
t.end();
150150
});

0 commit comments

Comments
 (0)