Skip to content

Commit 5b8b960

Browse files
committed
Auto-generated commit
1 parent f8491e1 commit 5b8b960

5 files changed

Lines changed: 56 additions & 178 deletions

File tree

.github/.keepalive

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22

33
> Package changelog.
44
5+
<section class="release" id="unreleased">
6+
7+
## Unreleased (2026-04-12)
8+
9+
<section class="commits">
10+
11+
### Commits
12+
13+
<details>
14+
15+
- [`06dbaf0`](https://github.com/stdlib-js/stdlib/commit/06dbaf057f7f6903a9ac6b053acace5c5adf9259) - **test:** migrate `math/base/special/erfc` to ULP base testing [(#11360)](https://github.com/stdlib-js/stdlib/pull/11360) _(by Shubham)_
16+
17+
</details>
18+
19+
</section>
20+
21+
<!-- /.commits -->
22+
23+
<section class="contributors">
24+
25+
### Contributors
26+
27+
A total of 1 person contributed to this release. Thank you to this contributor:
28+
29+
- Shubham
30+
31+
</section>
32+
33+
<!-- /.contributors -->
34+
35+
</section>
36+
37+
<!-- /.release -->
38+
539
<section class="release" id="v0.2.5">
640

741
## 0.2.5 (2026-02-08)

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@
5050
"@stdlib/utils-library-manifest": "^0.2.4"
5151
},
5252
"devDependencies": {
53+
"@stdlib/assert-is-almost-same-value": "^0.1.1",
5354
"@stdlib/console-log-each-map": "^0.1.1",
54-
"@stdlib/constants-float64-eps": "^0.2.3",
5555
"@stdlib/fs-read-file": "^0.2.3",
5656
"@stdlib/fs-write-file": "^0.2.3",
57-
"@stdlib/math-base-special-abs": "^0.2.3",
5857
"@stdlib/math-base-tools-evalpoly-compile": "^0.3.1",
5958
"@stdlib/math-base-tools-evalpoly-compile-c": "^0.2.2",
6059
"@stdlib/random-array-uniform": "^0.2.2",

test/test.js

Lines changed: 8 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ var tape = require( 'tape' );
2424
var isnan = require( '@stdlib/math-base-assert-is-nan' );
2525
var NINF = require( '@stdlib/constants-float64-ninf' );
2626
var PINF = require( '@stdlib/constants-float64-pinf' );
27-
var EPS = require( '@stdlib/constants-float64-eps' );
28-
var abs = require( '@stdlib/math-base-special-abs' );
27+
var isAlmostSameValue = require( '@stdlib/assert-is-almost-same-value' );
2928
var erfc = require( './../lib' );
3029

3130

@@ -55,8 +54,6 @@ tape( 'main export is a function', function test( t ) {
5554

5655
tape( 'the function evaluates the complementary error function for `x` on the interval `[-5,-100]', function test( t ) {
5756
var expected;
58-
var delta;
59-
var tol;
6057
var x;
6158
var y;
6259
var i;
@@ -65,21 +62,13 @@ tape( 'the function evaluates the complementary error function for `x` on the in
6562
x = largerNegative.x;
6663
for ( i = 0; i < x.length; i++ ) {
6764
y = erfc( x[i] );
68-
if ( y === expected[i] ) {
69-
t.strictEqual( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
70-
} else {
71-
delta = abs( y - expected[ i ] );
72-
tol = EPS * abs( expected[ i ] );
73-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol );
74-
}
65+
t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' );
7566
}
7667
t.end();
7768
});
7869

7970
tape( 'the function evaluates the complementary error function for `x` on the interval `[5,100]`', function test( t ) {
8071
var expected;
81-
var delta;
82-
var tol;
8372
var x;
8473
var y;
8574
var i;
@@ -88,21 +77,13 @@ tape( 'the function evaluates the complementary error function for `x` on the in
8877
x = largerPositive.x;
8978
for ( i = 0; i < x.length; i++ ) {
9079
y = erfc( x[i] );
91-
if ( y === expected[i] ) {
92-
t.strictEqual( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
93-
} else {
94-
delta = abs( y - expected[ i ] );
95-
tol = EPS * abs( expected[ i ] );
96-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol );
97-
}
80+
t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' );
9881
}
9982
t.end();
10083
});
10184

10285
tape( 'the function evaluates the complementary error function for `x` on the interval `[-2.5,-28]`', function test( t ) {
10386
var expected;
104-
var delta;
105-
var tol;
10687
var x;
10788
var y;
10889
var i;
@@ -111,21 +92,13 @@ tape( 'the function evaluates the complementary error function for `x` on the in
11192
x = largeNegative.x;
11293
for ( i = 0; i < x.length; i++ ) {
11394
y = erfc( x[i] );
114-
if ( y === expected[i] ) {
115-
t.strictEqual( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
116-
} else {
117-
delta = abs( y - expected[ i ] );
118-
tol = EPS * abs( expected[ i ] );
119-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol );
120-
}
95+
t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' );
12196
}
12297
t.end();
12398
});
12499

125100
tape( 'the function evaluates the complementary error function for `x` on the interval `[2.5,28]`', function test( t ) {
126101
var expected;
127-
var delta;
128-
var tol;
129102
var x;
130103
var y;
131104
var i;
@@ -134,21 +107,13 @@ tape( 'the function evaluates the complementary error function for `x` on the in
134107
x = largePositive.x;
135108
for ( i = 0; i < x.length; i++ ) {
136109
y = erfc( x[i] );
137-
if ( y === expected[i] ) {
138-
t.strictEqual( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
139-
} else {
140-
delta = abs( y - expected[ i ] );
141-
tol = EPS * abs( expected[ i ] );
142-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol );
143-
}
110+
t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' );
144111
}
145112
t.end();
146113
});
147114

148115
tape( 'the function evaluates the complementary error function for `x` on the interval `[-1,-3]`', function test( t ) {
149116
var expected;
150-
var delta;
151-
var tol;
152117
var x;
153118
var y;
154119
var i;
@@ -157,21 +122,13 @@ tape( 'the function evaluates the complementary error function for `x` on the in
157122
x = mediumNegative.x;
158123
for ( i = 0; i < x.length; i++ ) {
159124
y = erfc( x[i] );
160-
if ( y === expected[i] ) {
161-
t.strictEqual( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
162-
} else {
163-
delta = abs( y - expected[ i ] );
164-
tol = EPS * abs( expected[ i ] );
165-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol );
166-
}
125+
t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' );
167126
}
168127
t.end();
169128
});
170129

171130
tape( 'the function evaluates the complementary error function for `x` on the interval `[1,3]`', function test( t ) {
172131
var expected;
173-
var delta;
174-
var tol;
175132
var x;
176133
var y;
177134
var i;
@@ -180,21 +137,13 @@ tape( 'the function evaluates the complementary error function for `x` on the in
180137
x = mediumPositive.x;
181138
for ( i = 0; i < x.length; i++ ) {
182139
y = erfc( x[i] );
183-
if ( y === expected[i] ) {
184-
t.strictEqual( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
185-
} else {
186-
delta = abs( y - expected[ i ] );
187-
tol = EPS * abs( expected[ i ] );
188-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol );
189-
}
140+
t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' );
190141
}
191142
t.end();
192143
});
193144

194145
tape( 'the function evaluates the complementary error function for `x` on the interval `[-0.8,-1]`', function test( t ) {
195146
var expected;
196-
var delta;
197-
var tol;
198147
var x;
199148
var y;
200149
var i;
@@ -203,13 +152,7 @@ tape( 'the function evaluates the complementary error function for `x` on the in
203152
x = smallNegative.x;
204153
for ( i = 0; i < x.length; i++ ) {
205154
y = erfc( x[i] );
206-
if ( y === expected[i] ) {
207-
t.strictEqual( y, expected[i], 'x: '+x[i]+', y: '+y+', expected: '+expected[i] );
208-
} else {
209-
delta = abs( y - expected[ i ] );
210-
tol = EPS * abs( expected[ i ] );
211-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected[i]+'. Δ: '+delta+'. tol: '+tol );
212-
}
155+
t.strictEqual( isAlmostSameValue( y, expected[ i ], 1 ), true, 'returns expected value' );
213156
}
214157
t.end();
215158
});

0 commit comments

Comments
 (0)