Skip to content

Commit e2dfa4e

Browse files
committed
Fix function name and broken tests
1 parent 7f215d6 commit e2dfa4e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/node_modules/@stdlib/math/base/ops/csub/benchmark/benchmark.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var Complex128 = require( '@stdlib/complex/float64' );
2727
var real = require( '@stdlib/complex/real' );
2828
var imag = require( '@stdlib/complex/imag' );
2929
var pkg = require( './../package.json' ).name;
30-
var sub = require( './../lib' );
30+
var csub = require( './../lib' );
3131

3232

3333
// MAIN //
@@ -46,7 +46,7 @@ bench( pkg, function benchmark( b ) {
4646
b.tic();
4747
for ( i = 0; i < b.iterations; i++ ) {
4848
z = values[ i%values.length ];
49-
out = sub( z, z );
49+
out = csub( z, z );
5050
if ( typeof out !== 'object' ) {
5151
b.fail( 'should return an object' );
5252
}

lib/node_modules/@stdlib/math/base/ops/csub/benchmark/julia/benchmark.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import BenchmarkTools
2020
using Printf
2121

2222
# Benchmark variables:
23-
name = "subtract";
23+
name = "csub";
2424
repeats = 3;
2525

2626
"""

lib/node_modules/@stdlib/math/base/ops/csub/test/test.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -62,41 +62,41 @@ tape( 'if a real or imaginary component is `NaN`, the resulting component is `Na
6262

6363
v = csub( z1, z2 );
6464
t.strictEqual( isnan( real( v ) ), true, 'returns expected value' );
65-
t.strictEqual( imag( v ), 4.0, 'returns expected value' );
65+
t.strictEqual( imag( v ), 2.0, 'returns expected value' );
6666

6767
z1 = new Complex128( 5.0, 3.0 );
6868
z2 = new Complex128( NaN, 1.0 );
6969

7070
v = csub( z1, z2 );
7171
t.strictEqual( isnan( real( v ) ), true, 'returns expected value' );
72-
t.strictEqual( imag( v ), 4.0, 'returns expected value' );
72+
t.strictEqual( imag( v ), 2.0, 'returns expected value' );
7373

7474
z1 = new Complex128( NaN, 3.0 );
7575
z2 = new Complex128( NaN, 1.0 );
7676

7777
v = csub( z1, z2 );
7878
t.strictEqual( isnan( real( v ) ), true, 'returns expected value' );
79-
t.strictEqual( imag( v ), 4.0, 'returns expected value' );
79+
t.strictEqual( imag( v ), 2.0, 'returns expected value' );
8080

8181
z1 = new Complex128( 5.0, NaN );
8282
z2 = new Complex128( -2.0, 1.0 );
8383

8484
v = csub( z1, z2 );
85-
t.strictEqual( real( v ), 3.0, 'returns expected value' );
85+
t.strictEqual( real( v ), 7.0, 'returns expected value' );
8686
t.strictEqual( isnan( imag( v ) ), true, 'returns expected value' );
8787

8888
z1 = new Complex128( 5.0, 3.0 );
8989
z2 = new Complex128( -2.0, NaN );
9090

9191
v = csub( z1, z2 );
92-
t.strictEqual( real( v ), 3.0, 'returns expected value' );
92+
t.strictEqual( real( v ), 7.0, 'returns expected value' );
9393
t.strictEqual( isnan( imag( v ) ), true, 'returns expected value' );
9494

9595
z1 = new Complex128( 5.0, NaN );
9696
z2 = new Complex128( -2.0, NaN );
9797

9898
v = csub( z1, z2 );
99-
t.strictEqual( real( v ), 3.0, 'returns expected value' );
99+
t.strictEqual( real( v ), 7.0, 'returns expected value' );
100100
t.strictEqual( isnan( imag( v ) ), true, 'returns expected value' );
101101

102102
z1 = new Complex128( NaN, NaN );

0 commit comments

Comments
 (0)