2121// MODULES //
2222
2323var tape = require ( 'tape' ) ;
24+ var NINF = require ( '@stdlib/constants/float32/ninf' ) ;
25+ var PINF = require ( '@stdlib/constants/float32/pinf' ) ;
2426var isnanf = require ( '@stdlib/math/base/assert/is-nanf' ) ;
27+ var isPositiveZero = require ( '@stdlib/math/base/assert/is-positive-zero' ) ;
2528var randu = require ( '@stdlib/random/base/randu' ) ;
2629var f32 = require ( '@stdlib/number/float64/base/to-float32' ) ;
2730var 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' ) ;
3131var erfcinvf = require ( './../lib' ) ;
3232
3333
@@ -52,16 +52,16 @@ tape( 'main export is a function', function test( t ) {
5252
5353tape ( '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
7373tape ( '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
9393tape ( '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
113113tape ( '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
133133tape ( '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
153153tape ( '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
173173tape ( '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
0 commit comments