Skip to content

Commit 49b242a

Browse files
committed
fix: fixing styling for lint issues
1 parent 58488c3 commit 49b242a

2 files changed

Lines changed: 36 additions & 31 deletions

File tree

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24+
var NINF = require( '@stdlib/constants/float32/ninf' );
25+
var PINF = require( '@stdlib/constants/float32/pinf' );
2426
var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
27+
var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );
2528
var randu = require( '@stdlib/random/base/randu' );
2629
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2730
var isAlmostSameValue = require( '@stdlib/number/float32/base/assert/is-almost-same-value' );
28-
var NINF = require( '@stdlib/constants/float32/ninf' );
29-
var PINF = require( '@stdlib/constants/float32/pinf' );
30-
var isPositiveZero = require( '@stdlib/math/base/assert/is-positive-zero' );
3131
var erfcinvf = require( './../lib' );
3232

3333

@@ -52,16 +52,16 @@ tape( 'main export is a function', function test( t ) {
5252

5353
tape( 'the function evaluates the inverse complementary error function for `x` on the interval `[0.0002,0.25]`', function test( t ) {
5454
var expected;
55+
var ulps;
5556
var x;
5657
var y;
5758
var i;
5859
var e;
59-
var ulps;
6060

61+
ulps = 4;
6162
expected = x5.expected;
6263
x = x5.x;
6364

64-
ulps = 4;
6565
for ( i = 0; i < x.length; i++ ) {
6666
y = erfcinvf( x[ i ] );
6767
e = f32( expected[ i ] );
@@ -72,16 +72,16 @@ tape( 'the function evaluates the inverse complementary error function for `x` o
7272

7373
tape( 'the function evaluates the inverse complementary error function for `x` on the interval `[0.25,0.5]`', function test( t ) {
7474
var expected;
75+
var ulps;
7576
var x;
7677
var y;
7778
var i;
7879
var e;
79-
var ulps;
8080

81+
ulps = 3;
8182
expected = x2.expected;
8283
x = x2.x;
8384

84-
ulps = 3;
8585
for ( i = 0; i < x.length; i++ ) {
8686
y = erfcinvf( x[ i ] );
8787
e = f32( expected[ i ] );
@@ -92,16 +92,16 @@ tape( 'the function evaluates the inverse complementary error function for `x` o
9292

9393
tape( 'the function evaluates the inverse complementary error function for `x` on the interval `[0.5,1.5]`', function test( t ) {
9494
var expected;
95+
var ulps;
9596
var x;
9697
var y;
9798
var i;
9899
var e;
99-
var ulps;
100100

101+
ulps = 4;
101102
expected = x1.expected;
102103
x = x1.x;
103104

104-
ulps = 4;
105105
for ( i = 0; i < x.length; i++ ) {
106106
y = erfcinvf( x[ i ] );
107107
e = f32( expected[ i ] );
@@ -112,16 +112,16 @@ tape( 'the function evaluates the inverse complementary error function for `x` o
112112

113113
tape( 'the function evaluates the inverse complementary error function for `x` on the interval `[1.5,1.75]`', function test( t ) {
114114
var expected;
115+
var ulps;
115116
var x;
116117
var y;
117118
var i;
118119
var e;
119-
var ulps;
120120

121+
ulps = 3;
121122
expected = x3.expected;
122123
x = x3.x;
123124

124-
ulps = 3;
125125
for ( i = 0; i < x.length; i++ ) {
126126
y = erfcinvf( x[ i ] );
127127
e = f32( expected[ i ] );
@@ -132,16 +132,16 @@ tape( 'the function evaluates the inverse complementary error function for `x` o
132132

133133
tape( 'the function evaluates the inverse complementary error function for `x` on the interval `[1.75,1.9998]`', function test( t ) {
134134
var expected;
135+
var ulps;
135136
var x;
136137
var y;
137138
var i;
138139
var e;
139-
var ulps;
140140

141+
ulps = 4;
141142
expected = x4.expected;
142143
x = x4.x;
143144

144-
ulps = 4;
145145
for ( i = 0; i < x.length; i++ ) {
146146
y = erfcinvf( x[ i ] );
147147
e = f32( expected[ i ] );
@@ -152,16 +152,16 @@ tape( 'the function evaluates the inverse complementary error function for `x` o
152152

153153
tape( 'the function evaluates the inverse complementary error function for `x` on the interval `[1.9998,1.9999..8]`', function test( t ) {
154154
var expected;
155+
var ulps;
155156
var x;
156157
var y;
157158
var i;
158159
var e;
159-
var ulps;
160160

161+
ulps = 24;
161162
expected = x6.expected;
162163
x = x6.x;
163164

164-
ulps = 24;
165165
for ( i = 0; i < x.length; i++ ) {
166166
y = erfcinvf( x[ i ] );
167167
e = f32( expected[ i ] );
@@ -172,16 +172,16 @@ tape( 'the function evaluates the inverse complementary error function for `x` o
172172

173173
tape( 'the function evaluates the inverse complementary error function for `x` on the interval `[1.9999..8,2]`', function test( t ) {
174174
var expected;
175+
var ulps;
175176
var x;
176177
var y;
177178
var i;
178179
var e;
179-
var ulps;
180180

181+
ulps = 24;
181182
expected = x7.expected;
182183
x = x7.x;
183184

184-
ulps = 24;
185185
for ( i = 0; i < x.length; i++ ) {
186186
y = erfcinvf( x[ i ] );
187187
e = f32( expected[ i ] );
@@ -193,25 +193,25 @@ tape( 'the function evaluates the inverse complementary error function for `x` o
193193
t.end();
194194
});
195195

196-
tape( 'the function returns `NaN` if provided `NaN`', function test( t ) {
196+
tape( 'if provided `NaN`, the function returns `NaN`', function test( t ) {
197197
var v = erfcinvf( NaN );
198198
t.strictEqual( isnanf( v ), true, 'returns expected value' );
199199
t.end();
200200
});
201201

202-
tape( 'the function returns `+Infinity` if provided `0`', function test( t ) {
202+
tape( 'if provided `0`, the function returns `+Infinity`', function test( t ) {
203203
var v = erfcinvf( 0.0 );
204204
t.strictEqual( v, PINF, 'returns expected value' );
205205
t.end();
206206
});
207207

208-
tape( 'the function returns `0` if provided `1`', function test( t ) {
208+
tape( 'if provided `1`, the function returns `0`', function test( t ) {
209209
var v = erfcinvf( 1.0 );
210210
t.strictEqual( isPositiveZero( v ), true, 'returns expected value' );
211211
t.end();
212212
});
213213

214-
tape( 'the function returns `NaN` if provided a value which is either less than `0` or greater than `2`', function test( t ) {
214+
tape( 'if provided a value which is either less than `0` or greater than `2`, the function returns `NaN`', function test( t ) {
215215
var values;
216216
var v;
217217
var i;
@@ -237,13 +237,13 @@ tape( 'the function returns `NaN` if provided a value which is either less than
237237
t.end();
238238
});
239239

240-
tape( 'the function returns `-Infinity` if provided `2`', function test( t ) {
240+
tape( 'if provided `2`, the function returns `-Infinity`', function test( t ) {
241241
var v = erfcinvf( 2.0 );
242242
t.strictEqual( v, NINF, 'returns expected value' );
243243
t.end();
244244
});
245245

246-
tape( 'the function returns `NaN` if provided a value outside the domain [0,2]', function test( t ) {
246+
tape( 'if provided a value outside the domain [0,2], the function returns `NaN`', function test( t ) {
247247
var v;
248248
var i;
249249

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

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,27 @@ tape( 'main export is a function', opts, function test( t ) {
5757
t.end();
5858
});
5959

60-
tape( 'the function returns `NaN` if provided `NaN`', opts, function test( t ) {
60+
tape( 'if provided `NaN`, the function returns `NaN`', opts, function test( t ) {
6161
var v = erfcinvf( NaN );
6262
t.strictEqual( isnanf( v ), true, 'returns expected value' );
6363
t.end();
6464
});
6565

66-
tape( 'the function returns `+Infinity` if provided `0`', opts, function test( t ) {
67-
t.strictEqual( erfcinvf( 0.0 ), PINF, 'returns expected value' );
66+
tape( 'if provided `0`, the function returns `+Infinity`', opts, function test( t ) {
67+
var y = erfcinvf( 0.0 );
68+
t.strictEqual( y, PINF, 'returns expected value' );
6869
t.end();
6970
});
7071

71-
tape( 'the function returns `-Infinity` if provided `2`', opts, function test( t ) {
72-
t.strictEqual( erfcinvf( 2.0 ), NINF, 'returns expected value' );
72+
tape( 'if provided `2`, the function returns `-Infinity`', opts, function test( t ) {
73+
var y = erfcinvf( 2.0 );
74+
t.strictEqual( y, NINF, 'returns expected value' );
7375
t.end();
7476
});
7577

76-
tape( 'the function returns `0` if provided `1`', opts, function test( t ) {
77-
t.strictEqual( isPositiveZero( erfcinvf( 1.0 ) ), true, 'returns expected value' );
78+
tape( 'if provided `1`, the function returns `0`', opts, function test( t ) {
79+
var y = erfcinvf( 1.0 );
80+
t.strictEqual( isPositiveZero( y ), true, 'returns expected value' );
7881
t.end();
7982
});
8083

@@ -122,8 +125,10 @@ tape( 'the function handles representative boundary values across intervals', op
122125
f32( 1.99999 )
123126
];
124127
var i;
128+
var y;
129+
var e;
125130
for ( i = 0; i < values.length; i++ ) {
126-
var y = erfcinvf( values[i] );
131+
y = erfcinvf( values[i] );
127132
t.ok( !isnanf( y ) || values[i] < 0.0003 || values[i] > 1.9999, 'x: '+values[i]+', y: '+y );
128133
}
129134
t.end();

0 commit comments

Comments
 (0)