Skip to content

Commit ffdc830

Browse files
committed
"fixed spacing conventions"
1 parent 224c819 commit ffdc830

File tree

5 files changed

+55
-55
lines changed

5 files changed

+55
-55
lines changed

lib/node_modules/@stdlib/math/base/special/cosc/benchmark/c/native/benchmark.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static void print_summary( int total, int passing ) {
5555
* @param elapsed elapsed time in seconds
5656
*/
5757
static void print_results( double elapsed ) {
58-
double rate = (double)ITERATIONS / elapsed;
58+
double rate = ( double )ITERATIONS / elapsed;
5959
printf( " ---\n" );
6060
printf( " iterations: %d\n", ITERATIONS );
6161
printf( " elapsed: %0.9f\n", elapsed );
@@ -71,7 +71,7 @@ static void print_results( double elapsed ) {
7171
static double tic( void ) {
7272
struct timeval now;
7373
gettimeofday( &now, NULL );
74-
return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
74+
return ( double )now.tv_sec + ( double )now.tv_usec/1.0e6;
7575
}
7676

7777
/**
@@ -81,7 +81,7 @@ static double tic( void ) {
8181
*/
8282
static double rand_double( void ) {
8383
int r = rand();
84-
return (double)r / ( (double)RAND_MAX + 1.0 );
84+
return ( double ) r / ( ( double ) RAND_MAX + 1.0 );
8585
}
8686

8787
/**

lib/node_modules/@stdlib/math/base/special/cosc/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function cosc( x ) {
8080
if ( x === 0.0 ) {
8181
return 0.0;
8282
}
83-
return (cospi( x ) - (sinpi( x )/(PI*x))) / x;
83+
return ( cospi( x ) - ( sinpi( x ) / ( PI*x ) ) ) / x;
8484
}
8585

8686

lib/node_modules/@stdlib/math/base/special/cosc/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ double stdlib_base_cosc( const double x ) {
6262
if ( x == 0.0 ) {
6363
return 0.0;
6464
}
65-
return (stdlib_base_cospi( x ) - (stdlib_base_sinpi( x )/(STDLIB_CONSTANT_FLOAT64_PI * x))) / x;
65+
return ( stdlib_base_cospi( x ) - ( stdlib_base_sinpi( x ) / ( STDLIB_CONSTANT_FLOAT64_PI * x ) ) ) / x;
6666
}

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

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ tape( 'the function computes the derivative of cardinal sine', function test( t
5858
expected = data.expected;
5959

6060
for ( i = 0; i < x.length; i++ ) {
61-
y = cosc( x[i] );
61+
y = cosc( x[ i ] );
6262
if ( y === expected[ i ] ) {
63-
t.equal( y, expected[ i ], 'x: '+x[i]+'. Expected: '+expected[i] );
63+
t.equal( y, expected[ i ], 'x: '+x[ i ]+'. Expected: '+expected[ i ] );
6464
} else {
65-
delta = abs( y - expected[i] );
66-
tol = 2.0 * EPS * abs( expected[i] );
67-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. Expected: '+expected[i]+'. Tolerance: '+tol+'.' );
65+
delta = abs( y - expected[ i ] );
66+
tol = 2.0 * EPS * abs( expected[ i ] );
67+
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. Value: '+y+'. Expected: '+expected[ i ]+'. Tolerance: '+tol+'.' );
6868
}
6969
}
7070
t.end();
@@ -82,13 +82,13 @@ tape( 'the function computes the derivative of cardinal sine (large negative)',
8282
expected = largeNegative.expected;
8383

8484
for ( i = 0; i < x.length; i++ ) {
85-
y = cosc( x[i] );
85+
y = cosc( x[ i ] );
8686
if ( y === expected[ i ] ) {
87-
t.equal( y, expected[ i ], 'x: '+x[i]+'. Expected: '+expected[i] );
87+
t.equal( y, expected[ i ], 'x: '+x[ i ]+'. Expected: '+expected[ i ] );
8888
} else {
89-
delta = abs( y - expected[i] );
90-
tol = 2.0 * EPS * abs( expected[i] );
91-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. Expected: '+expected[i]+'. Tolerance: '+tol+'.' );
89+
delta = abs( y - expected[ i ] );
90+
tol = 2.0 * EPS * abs( expected[ i ] );
91+
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. Value: '+y+'. Expected: '+expected[ i ]+'. Tolerance: '+tol+'.' );
9292
}
9393
}
9494
t.end();
@@ -106,13 +106,13 @@ tape( 'the function computes the derivative of cardinal sine (large positive)',
106106
expected = largePositive.expected;
107107

108108
for ( i = 0; i < x.length; i++ ) {
109-
y = cosc( x[i] );
109+
y = cosc( x[ i ] );
110110
if ( y === expected[ i ] ) {
111-
t.equal( y, expected[ i ], 'x: '+x[i]+'. Expected: '+expected[i] );
111+
t.equal( y, expected[ i ], 'x: '+x[ i ]+'. Expected: '+expected[ i ] );
112112
} else {
113-
delta = abs( y - expected[i] );
114-
tol = 2.0 * EPS * abs( expected[i] );
115-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. Expected: '+expected[i]+'. Tolerance: '+tol+'.' );
113+
delta = abs( y - expected[ i ] );
114+
tol = 2.0 * EPS * abs( expected[ i ] );
115+
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. Value: '+y+'. Expected: '+expected[ i ]+'. Tolerance: '+tol+'.' );
116116
}
117117
}
118118
t.end();
@@ -130,13 +130,13 @@ tape( 'the function computes the derivative of cardinal sine (tiny negative)', f
130130
expected = tinyNegative.expected;
131131

132132
for ( i = 0; i < x.length; i++ ) {
133-
y = cosc( x[i] );
133+
y = cosc( x[ i ] );
134134
if ( y === expected[ i ] ) {
135-
t.equal( y, expected[ i ], 'x: '+x[i]+'. Expected: '+expected[i] );
135+
t.equal( y, expected[ i ], 'x: '+x[ i ]+'. Expected: '+expected[ i ] );
136136
} else {
137-
delta = abs( y - expected[i] );
138-
tol = EPS * abs( expected[i] );
139-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. Expected: '+expected[i]+'. Tolerance: '+tol+'.' );
137+
delta = abs( y - expected[ i ] );
138+
tol = EPS * abs( expected[ i ] );
139+
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. Value: '+y+'. Expected: '+expected[ i ]+'. Tolerance: '+tol+'.' );
140140
}
141141
}
142142
t.end();
@@ -154,13 +154,13 @@ tape( 'the function computes the derivative of cardinal sine (tiny positive)', f
154154
expected = tinyPositive.expected;
155155

156156
for ( i = 0; i < x.length; i++ ) {
157-
y = cosc( x[i] );
157+
y = cosc( x[ i ] );
158158
if ( y === expected[ i ] ) {
159-
t.equal( y, expected[ i ], 'x: '+x[i]+'. Expected: '+expected[i] );
159+
t.equal( y, expected[ i ], 'x: '+x[ i ]+'. Expected: '+expected[ i ] );
160160
} else {
161-
delta = abs( y - expected[i] );
162-
tol = EPS * abs( expected[i] );
163-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. Expected: '+expected[i]+'. Tolerance: '+tol+'.' );
161+
delta = abs( y - expected[ i ] );
162+
tol = EPS * abs( expected[ i ] );
163+
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. Value: '+y+'. Expected: '+expected[ i ]+'. Tolerance: '+tol+'.' );
164164
}
165165
}
166166
t.end();

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

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ tape( 'the function computes the derivative of cardinal sine', opts, function te
6767
expected = data.expected;
6868

6969
for ( i = 0; i < x.length; i++ ) {
70-
y = cosc( x[i] );
70+
y = cosc( x[ i ] );
7171
if ( y === expected[ i ] ) {
72-
t.equal( y, expected[ i ], 'x: '+x[i]+'. Expected: '+expected[i] );
72+
t.equal( y, expected[ i ], 'x: '+x[ i ]+'. Expected: '+expected[ i ] );
7373
} else {
74-
delta = abs( y - expected[i] );
75-
tol = 2.0 * EPS * abs( expected[i] );
76-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. Expected: '+expected[i]+'. Tolerance: '+tol+'.' );
74+
delta = abs( y - expected[ i ] );
75+
tol = 2.0 * EPS * abs( expected[ i ] );
76+
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. Value: '+y+'. Expected: '+expected[ i ]+'. Tolerance: '+tol+'.' );
7777
}
7878
}
7979
t.end();
@@ -91,13 +91,13 @@ tape( 'the function computes the cardinal cose (large negative)', opts, function
9191
expected = largeNegative.expected;
9292

9393
for ( i = 0; i < x.length; i++ ) {
94-
y = cosc( x[i] );
94+
y = cosc( x[ i ] );
9595
if ( y === expected[ i ] ) {
96-
t.equal( y, expected[ i ], 'x: '+x[i]+'. Expected: '+expected[i] );
96+
t.equal( y, expected[ i ], 'x: '+x[ i ]+'. Expected: '+expected[ i ] );
9797
} else {
98-
delta = abs( y - expected[i] );
99-
tol = 2.0 * EPS * abs( expected[i] );
100-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. Expected: '+expected[i]+'. Tolerance: '+tol+'.' );
98+
delta = abs( y - expected[ i ] );
99+
tol = 2.0 * EPS * abs( expected[ i ] );
100+
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. Value: '+y+'. Expected: '+expected[ i ]+'. Tolerance: '+tol+'.' );
101101
}
102102
}
103103
t.end();
@@ -115,13 +115,13 @@ tape( 'the function computes the derivative of cardinal sine (large positive)',
115115
expected = largePositive.expected;
116116

117117
for ( i = 0; i < x.length; i++ ) {
118-
y = cosc( x[i] );
118+
y = cosc( x[ i ] );
119119
if ( y === expected[ i ] ) {
120-
t.equal( y, expected[ i ], 'x: '+x[i]+'. Expected: '+expected[i] );
120+
t.equal( y, expected[ i ], 'x: '+x[ i ]+'. Expected: '+expected[ i ] );
121121
} else {
122-
delta = abs( y - expected[i] );
123-
tol = 2.0 * EPS * abs( expected[i] );
124-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. Expected: '+expected[i]+'. Tolerance: '+tol+'.' );
122+
delta = abs( y - expected[ i ] );
123+
tol = 2.0 * EPS * abs( expected[ i ] );
124+
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. Value: '+y+'. Expected: '+expected[ i ]+'. Tolerance: '+tol+'.' );
125125
}
126126
}
127127
t.end();
@@ -139,13 +139,13 @@ tape( 'the function computes the derivative of cardinal sine (tiny negative)', o
139139
expected = tinyNegative.expected;
140140

141141
for ( i = 0; i < x.length; i++ ) {
142-
y = cosc( x[i] );
142+
y = cosc( x[ i ] );
143143
if ( y === expected[ i ] ) {
144-
t.equal( y, expected[ i ], 'x: '+x[i]+'. Expected: '+expected[i] );
144+
t.equal( y, expected[ i ], 'x: '+x[ i ]+'. Expected: '+expected[ i ] );
145145
} else {
146-
delta = abs( y - expected[i] );
147-
tol = EPS * abs( expected[i] );
148-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. Expected: '+expected[i]+'. Tolerance: '+tol+'.' );
146+
delta = abs( y - expected[ i ] );
147+
tol = EPS * abs( expected[ i ] );
148+
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. Value: '+y+'. Expected: '+expected[ i ]+'. Tolerance: '+tol+'.' );
149149
}
150150
}
151151
t.end();
@@ -163,13 +163,13 @@ tape( 'the function computes the derivative of cardinal sine (tiny positive)', o
163163
expected = tinyPositive.expected;
164164

165165
for ( i = 0; i < x.length; i++ ) {
166-
y = cosc( x[i] );
166+
y = cosc( x[ i ] );
167167
if ( y === expected[ i ] ) {
168-
t.equal( y, expected[ i ], 'x: '+x[i]+'. Expected: '+expected[i] );
168+
t.equal( y, expected[ i ], 'x: '+x[ i ]+'. Expected: '+expected[ i ] );
169169
} else {
170-
delta = abs( y - expected[i] );
171-
tol = EPS * abs( expected[i] );
172-
t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. Value: '+y+'. Expected: '+expected[i]+'. Tolerance: '+tol+'.' );
170+
delta = abs( y - expected[ i ] );
171+
tol = EPS * abs( expected[ i ] );
172+
t.ok( delta <= tol, 'within tolerance. x: '+x[ i ]+'. Value: '+y+'. Expected: '+expected[ i ]+'. Tolerance: '+tol+'.' );
173173
}
174174
}
175175
t.end();

0 commit comments

Comments
 (0)