Skip to content

Commit 0adc507

Browse files
committed
test: update tests to use correct thresholds
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 0d51850 commit 0adc507

7 files changed

Lines changed: 43 additions & 38 deletions

File tree

lib/node_modules/@stdlib/math/base/special/asinhf/test/fixtures/julia/huge_negative.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/node_modules/@stdlib/math/base/special/asinhf/test/fixtures/julia/huge_positive.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/node_modules/@stdlib/math/base/special/asinhf/test/fixtures/julia/runner.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,24 @@ import JSON
2020

2121
"""
2222
gen( domain, name )
23+
2324
Generate fixture data and write to file.
25+
2426
# Arguments
27+
2528
* `domain`: domain
2629
* `name::AbstractString`: output filename
30+
2731
# Examples
32+
2833
``` julia
2934
julia> x = range( -1000, stop = 1000, length = 2001 );
3035
julia> gen( x, \"data.json\" );
3136
```
3237
"""
3338
function gen( domain, name )
3439
x = collect( domain );
35-
y = Float32.( asinh.( Float32.( x ) ) );
40+
y = asinh.( Float32.( x ) );
3641

3742
# Store data to be written to file as a collection:
3843
data = Dict([
@@ -57,11 +62,11 @@ file = @__FILE__;
5762
dir = dirname( file );
5863

5964
# Negative tiny values:
60-
x = range( -2.0^-29, stop = -2.0^-38, length = 503 );
65+
x = range( -1e-30, stop = -1e-38, length = 503 );
6166
gen( x, "tiny_negative.json" );
6267

6368
# Positive tiny values:
64-
x = range( 2.0^-38, stop = 2.0^-29, length = 503 );
69+
x = range( 1e-30, stop = 1e-38, length = 503 );
6570
gen( x, "tiny_positive.json" );
6671

6772
# Small(er) values:
@@ -101,9 +106,9 @@ x = range( 28.0, stop = 100.0, length = 503 );
101106
gen( x, "larger_positive.json" );
102107

103108
# Huge negative values:
104-
x = range( -2.0^30, stop = -2.0^38, length = 503 );
109+
x = range( -1e30, stop = -1e38, length = 503 );
105110
gen( x, "huge_negative.json" );
106111

107112
# Huge positive values:
108-
x = range( 2.0^30, stop = 2.0^38, length = 503 );
113+
x = range( 1e30, stop = 1e38, length = 503 );
109114
gen( x, "huge_positive.json" );

lib/node_modules/@stdlib/math/base/special/asinhf/test/fixtures/julia/tiny_negative.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/node_modules/@stdlib/math/base/special/asinhf/test/fixtures/julia/tiny_positive.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ tape( 'main export is a function', function test( t ) {
5656
t.end();
5757
});
5858

59-
tape( 'the function computes the hyperbolic arcsine on the interval `[-2.0^-29,-2.0^-38]`', function test( t ) {
59+
tape( 'the function computes the hyperbolic arcsine on the interval `[-1e-38,-1e-30]`', function test( t ) {
6060
var expected;
6161
var v;
6262
var x;
@@ -70,12 +70,12 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[-2.0^-29,-
7070
x[ i ] = f32( x[ i ] );
7171
v = asinhf( x[ i ] );
7272
e = f32( expected[ i ] );
73-
t.strictEqual( ulpdiff( v, e ) <= 1, true, 'returns expected value' );
73+
t.strictEqual( v, e, 'returns expected value' );
7474
}
7575
t.end();
7676
});
7777

78-
tape( 'the function computes the hyperbolic arcsine on the interval `[2.0^-38,2.0^-29]`', function test( t ) {
78+
tape( 'the function computes the hyperbolic arcsine on the interval `[1e-30,1e-38]`', function test( t ) {
7979
var expected;
8080
var v;
8181
var x;
@@ -89,7 +89,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[2.0^-38,2.
8989
x[ i ] = f32( x[ i ] );
9090
v = asinhf( x[ i ] );
9191
e = f32( expected[ i ] );
92-
t.strictEqual( ulpdiff( v, e ) <= 1, true, 'returns expected value' );
92+
t.strictEqual( v, e, 'returns expected value' );
9393
}
9494
t.end();
9595
});
@@ -265,7 +265,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[-100.0,-28
265265
t.end();
266266
});
267267

268-
tape( 'the function computes the hyperbolic arcsine on the interval `[-2.0^30,-2.0^38]`', function test( t ) {
268+
tape( 'the function computes the hyperbolic arcsine on the interval `[-1e30,-1e38]`', function test( t ) {
269269
var expected;
270270
var v;
271271
var x;
@@ -279,12 +279,12 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[-2.0^30,-2
279279
x[ i ] = f32( x[ i ] );
280280
v = asinhf( x[ i ] );
281281
e = f32( expected[ i ] );
282-
t.strictEqual( ulpdiff( v, e ) <= 1, true, 'returns expected value' );
282+
t.strictEqual( v, e, 'returns expected value' );
283283
}
284284
t.end();
285285
});
286286

287-
tape( 'the function computes the hyperbolic arcsine on the interval `[2.0^30,2.0^38]`', function test( t ) {
287+
tape( 'the function computes the hyperbolic arcsine on the interval `[1e30,1e38]`', function test( t ) {
288288
var expected;
289289
var v;
290290
var x;
@@ -298,7 +298,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[2.0^30,2.0
298298
x[ i ] = f32( x[ i ] );
299299
v = asinhf( x[ i ] );
300300
e = f32( expected[ i ] );
301-
t.strictEqual( ulpdiff( v, e ) <= 1, true, 'returns expected value' );
301+
t.strictEqual( v, e, 'returns expected value' );
302302
}
303303
t.end();
304304
});
@@ -322,13 +322,13 @@ tape( 'the function returns `-infinity` if provided `-infinity`', function test(
322322
});
323323

324324
tape( 'the function returns `-0` if provided `-0`', function test( t ) {
325-
var v = asinhf( -0 );
325+
var v = asinhf( f32( -0.0 ) );
326326
t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' );
327327
t.end();
328328
});
329329

330330
tape( 'the function returns `+0` if provided `+0`', function test( t ) {
331-
var v = asinhf( +0 );
331+
var v = asinhf( f32( +0.0 ) );
332332
t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' );
333333
t.end();
334334
});

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ tape( 'main export is a function', opts, function test( t ) {
6565
t.end();
6666
});
6767

68-
tape( 'the function computes the hyperbolic arcsine on the interval `[-2.0^-29,-2.0^-38]`', function test( t ) {
68+
tape( 'the function computes the hyperbolic arcsine on the interval `[-1e-38,-1e-30]`', opts, function test( t ) {
6969
var expected;
7070
var v;
7171
var x;
@@ -79,12 +79,12 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[-2.0^-29,-
7979
x[ i ] = f32( x[ i ] );
8080
v = asinhf( x[ i ] );
8181
e = f32( expected[ i ] );
82-
t.strictEqual( ulpdiff( v, e ) <= 1, true, 'returns expected value' );
82+
t.strictEqual( v, e, 'returns expected value' );
8383
}
8484
t.end();
8585
});
8686

87-
tape( 'the function computes the hyperbolic arcsine on the interval `[2.0^-38,2.0^-29]`', function test( t ) {
87+
tape( 'the function computes the hyperbolic arcsine on the interval `[1e-30,1e-38]`', opts, function test( t ) {
8888
var expected;
8989
var v;
9090
var x;
@@ -98,12 +98,12 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[2.0^-38,2.
9898
x[ i ] = f32( x[ i ] );
9999
v = asinhf( x[ i ] );
100100
e = f32( expected[ i ] );
101-
t.strictEqual( ulpdiff( v, e ) <= 1, true, 'returns expected value' );
101+
t.strictEqual( v, e, 'returns expected value' );
102102
}
103103
t.end();
104104
});
105105

106-
tape( 'the function computes the hyperbolic arcsine on the interval `[-0.8,0.8]`', function test( t ) {
106+
tape( 'the function computes the hyperbolic arcsine on the interval `[-0.8,0.8]`', opts, function test( t ) {
107107
var expected;
108108
var v;
109109
var x;
@@ -122,7 +122,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[-0.8,0.8]`
122122
t.end();
123123
});
124124

125-
tape( 'the function computes the hyperbolic arcsine on the interval `[-1.0,-0.8]`', function test( t ) {
125+
tape( 'the function computes the hyperbolic arcsine on the interval `[-1.0,-0.8]`', opts, function test( t ) {
126126
var expected;
127127
var v;
128128
var x;
@@ -141,7 +141,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[-1.0,-0.8]
141141
t.end();
142142
});
143143

144-
tape( 'the function computes the hyperbolic arcsine on the interval `[0.8,1.0]`', function test( t ) {
144+
tape( 'the function computes the hyperbolic arcsine on the interval `[0.8,1.0]`', opts, function test( t ) {
145145
var expected;
146146
var v;
147147
var x;
@@ -160,7 +160,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[0.8,1.0]`'
160160
t.end();
161161
});
162162

163-
tape( 'the function computes the hyperbolic arcsine on the interval `[-3.0,-1.0]`', function test( t ) {
163+
tape( 'the function computes the hyperbolic arcsine on the interval `[-3.0,-1.0]`', opts, function test( t ) {
164164
var expected;
165165
var v;
166166
var x;
@@ -179,7 +179,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[-3.0,-1.0]
179179
t.end();
180180
});
181181

182-
tape( 'the function computes the hyperbolic arcsine on the interval `[1.0,3.0]`', function test( t ) {
182+
tape( 'the function computes the hyperbolic arcsine on the interval `[1.0,3.0]`', opts, function test( t ) {
183183
var expected;
184184
var v;
185185
var x;
@@ -198,7 +198,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[1.0,3.0]`'
198198
t.end();
199199
});
200200

201-
tape( 'the function computes the hyperbolic arcsine on the interval `[3.0,28.0]`', function test( t ) {
201+
tape( 'the function computes the hyperbolic arcsine on the interval `[3.0,28.0]`', opts, function test( t ) {
202202
var expected;
203203
var v;
204204
var x;
@@ -217,7 +217,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[3.0,28.0]`
217217
t.end();
218218
});
219219

220-
tape( 'the function computes the hyperbolic arcsine on the interval `[-28.0,-3.0]`', function test( t ) {
220+
tape( 'the function computes the hyperbolic arcsine on the interval `[-28.0,-3.0]`', opts, function test( t ) {
221221
var expected;
222222
var v;
223223
var x;
@@ -236,7 +236,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[-28.0,-3.0
236236
t.end();
237237
});
238238

239-
tape( 'the function computes the hyperbolic arcsine on the interval `[28.0,100.0]`', function test( t ) {
239+
tape( 'the function computes the hyperbolic arcsine on the interval `[28.0,100.0]`', opts, function test( t ) {
240240
var expected;
241241
var v;
242242
var x;
@@ -255,7 +255,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[28.0,100.0
255255
t.end();
256256
});
257257

258-
tape( 'the function computes the hyperbolic arcsine on the interval `[-100.0,-28.0]`', function test( t ) {
258+
tape( 'the function computes the hyperbolic arcsine on the interval `[-100.0,-28.0]`', opts, function test( t ) {
259259
var expected;
260260
var v;
261261
var x;
@@ -274,7 +274,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[-100.0,-28
274274
t.end();
275275
});
276276

277-
tape( 'the function computes the hyperbolic arcsine on the interval `[-2.0^30,-2.0^38]`', function test( t ) {
277+
tape( 'the function computes the hyperbolic arcsine on the interval `[-1e30,-1e38]`', opts, function test( t ) {
278278
var expected;
279279
var v;
280280
var x;
@@ -288,12 +288,12 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[-2.0^30,-2
288288
x[ i ] = f32( x[ i ] );
289289
v = asinhf( x[ i ] );
290290
e = f32( expected[ i ] );
291-
t.strictEqual( ulpdiff( v, e ) <= 1, true, 'returns expected value' );
291+
t.strictEqual( v, e, 'returns expected value' );
292292
}
293293
t.end();
294294
});
295295

296-
tape( 'the function computes the hyperbolic arcsine on the interval `[2.0^30,2.0^38]`', function test( t ) {
296+
tape( 'the function computes the hyperbolic arcsine on the interval `[1e30,1e38]`', opts, function test( t ) {
297297
var expected;
298298
var v;
299299
var x;
@@ -307,7 +307,7 @@ tape( 'the function computes the hyperbolic arcsine on the interval `[2.0^30,2.0
307307
x[ i ] = f32( x[ i ] );
308308
v = asinhf( x[ i ] );
309309
e = f32( expected[ i ] );
310-
t.strictEqual( ulpdiff( v, e ) <= 1, true, 'returns expected value' );
310+
t.strictEqual( v, e, 'returns expected value' );
311311
}
312312
t.end();
313313
});
@@ -331,13 +331,13 @@ tape( 'the function returns `-infinity` if provided `-infinity`', opts, function
331331
});
332332

333333
tape( 'the function returns `-0` if provided `-0`', opts, function test( t ) {
334-
var v = asinhf( -0 );
334+
var v = asinhf( f32( -0.0 ) );
335335
t.strictEqual( isNegativeZerof( v ), true, 'returns expected value' );
336336
t.end();
337337
});
338338

339339
tape( 'the function returns `+0` if provided `+0`', opts, function test( t ) {
340-
var v = asinhf( +0 );
340+
var v = asinhf( f32( +0.0 ) );
341341
t.strictEqual( isPositiveZerof( v ), true, 'returns expected value' );
342342
t.end();
343343
});

0 commit comments

Comments
 (0)