22
22
23
23
var tape = require ( 'tape' ) ;
24
24
var isnan = require ( '@stdlib/math/base/assert/is-nan' ) ;
25
- var abs = require ( '@stdlib/math/base/special/abs' ) ;
26
25
var PINF = require ( '@stdlib/constants/float64/pinf' ) ;
27
26
var NINF = require ( '@stdlib/constants/float64/ninf' ) ;
28
- var EPS = require ( '@stdlib/constants/float64/eps' ) ;
29
27
var skewness = require ( './../lib' ) ;
30
28
31
29
@@ -77,10 +75,8 @@ tape( 'if provided a nonpositive `s`, the function returns `NaN`', function test
77
75
t . end ( ) ;
78
76
} ) ;
79
77
80
- tape ( 'the function returns the skewness of a logistic distribution' , function test ( t ) {
78
+ tape ( 'the function returns the skewness of a logistic distribution (always 0) ' , function test ( t ) {
81
79
var expected ;
82
- var delta ;
83
- var tol ;
84
80
var mu ;
85
81
var s ;
86
82
var y ;
@@ -91,15 +87,7 @@ tape( 'the function returns the skewness of a logistic distribution', function t
91
87
s = data . s ;
92
88
for ( i = 0 ; i < mu . length ; i ++ ) {
93
89
y = skewness ( mu [ i ] , s [ i ] ) ;
94
- if ( expected [ i ] !== null ) {
95
- if ( y === expected [ i ] ) {
96
- t . equal ( y , expected [ i ] , 'mu:' + mu [ i ] + ', s: ' + s [ i ] + ', y: ' + y + ', expected: ' + expected [ i ] ) ;
97
- } else {
98
- delta = abs ( y - expected [ i ] ) ;
99
- tol = 2.0 * EPS * abs ( expected [ i ] ) ;
100
- t . ok ( delta <= tol , 'within tolerance. mu: ' + mu [ i ] + '. s: ' + s [ i ] + '. y: ' + y + '. E: ' + expected [ i ] + '. Δ: ' + delta + '. tol: ' + tol + '.' ) ;
101
- }
102
- }
90
+ t . equal ( y , expected [ i ] , 'mu:' + mu [ i ] + ', s: ' + s [ i ] + ', y: ' + y + ', expected: ' + expected [ i ] ) ;
103
91
}
104
92
t . end ( ) ;
105
93
} ) ;
0 commit comments