Skip to content

Commit 506cc9e

Browse files
authored
chore: code review
1 parent 1f723af commit 506cc9e

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

lib/node_modules/@stdlib/math/base/special/cabsf/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Computes the [absolute value][absolute-value] of a single-precision complex floa
130130
```c
131131
#include "stdlib/complex/float32/ctor.h"
132132

133-
stdlib_complex64_t z = stdlib_complex64( 5.0, 3.0 );
133+
stdlib_complex64_t z = stdlib_complex64( 5.0f, 3.0f );
134134

135135
float y = stdlib_base_cabsf( z );
136136
// returns ~5.83f
@@ -141,7 +141,7 @@ The function accepts the following arguments:
141141
- **z**: `[in] stdlib_complex64_t` input value.
142142

143143
```c
144-
float stdlib_base_cabsf( const stdlib_complex64_t complex z );
144+
float stdlib_base_cabsf( const stdlib_complex64_t z );
145145
```
146146
147147
</section>
@@ -173,7 +173,7 @@ int main( void ) {
173173
stdlib_complex64( 3.14f, 1.0f ),
174174
stdlib_complex64( -3.14f, -1.0f ),
175175
stdlib_complex64( 0.0f, 0.0f ),
176-
stdlib_complex64( 0.0f / 0.0f, 0.0f / 0.0f )
176+
stdlib_complex64( 0.0f/0.0f, 0.0f/0.0f )
177177
};
178178
179179
stdlib_complex64_t v;

lib/node_modules/@stdlib/math/base/special/cabsf/benchmark/c/benchmark.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ static double benchmark( void ) {
9999

100100
t = tic();
101101
for ( i = 0; i < ITERATIONS; i++ ) {
102-
re = ( 1000.0f * rand_float() ) - 500.0f;
103-
im = ( 1000.0f * rand_float() ) - 500.0f;
102+
re = ( 1000.0f*rand_float() ) - 500.0f;
103+
im = ( 1000.0f*rand_float() ) - 500.0f;
104104
z = re + im*I;
105105
y = cabsf( z );
106106
if ( y != y ) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ static double benchmark( void ) {
100100
int i;
101101

102102
for ( i = 0; i < 100; i++ ) {
103-
re[ i ] = ( 1000.0f * rand_float() ) - 500.0f;
104-
im[ i ] = ( 1000.0f * rand_float() ) - 500.0f;
103+
re[ i ] = ( 1000.0f*rand_float() ) - 500.0f;
104+
im[ i ] = ( 1000.0f*rand_float() ) - 500.0f;
105105
}
106106

107107
stdlib_complex64_t z;
108108

109109
t = tic();
110110
for ( i = 0; i < ITERATIONS; i++ ) {
111-
z = stdlib_complex64( re[ i % 100 ], im[ i % 100 ] );
111+
z = stdlib_complex64( re[ i%100 ], im[ i%100 ] );
112112
y = stdlib_base_cabsf( z );
113113
if ( y != y ) {
114114
printf( "should not return NaN\n" );

lib/node_modules/@stdlib/math/base/special/cabsf/examples/c/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ int main( void ) {
2626
stdlib_complex64( 3.14f, 1.0f ),
2727
stdlib_complex64( -3.14f, -1.0f ),
2828
stdlib_complex64( 0.0f, 0.0f ),
29-
stdlib_complex64( 0.0f / 0.0f, 0.0f / 0.0f )
29+
stdlib_complex64( 0.0f/0.0f, 0.0f/0.0f )
3030
};
3131

3232
stdlib_complex64_t v;

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ tape( 'if either the real or imaginary component is `NaN`, the function returns
7171
var v;
7272

7373
v = cabsf( new Complex64( NaN, 3.0 ) );
74-
t.strictEqual( isnanf( v ), true, 'returns NaN' );
74+
t.strictEqual( isnanf( v ), true, 'returns expected value' );
7575

7676
v = cabsf( new Complex64( 5.0, NaN ) );
77-
t.strictEqual( isnanf( v ), true, 'returns NaN' );
77+
t.strictEqual( isnanf( v ), true, 'returns expected value' );
7878

7979
v = cabsf( new Complex64( NaN, NaN ) );
80-
t.strictEqual( isnanf( v ), true, 'returns NaN' );
80+
t.strictEqual( isnanf( v ), true, 'returns expected value' );
8181

8282
t.end();
8383
});

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ tape( 'if either the real or imaginary component is `NaN`, the function returns
8080
var v;
8181

8282
v = cabsf( new Complex64( NaN, 3.0 ) );
83-
t.strictEqual( isnanf( v ), true, 'returns NaN' );
83+
t.strictEqual( isnanf( v ), true, 'returns expected value' );
8484

8585
v = cabsf( new Complex64( 5.0, NaN ) );
86-
t.strictEqual( isnanf( v ), true, 'returns NaN' );
86+
t.strictEqual( isnanf( v ), true, 'returns expected value' );
8787

8888
v = cabsf( new Complex64( NaN, NaN ) );
89-
t.strictEqual( isnanf( v ), true, 'returns NaN' );
89+
t.strictEqual( isnanf( v ), true, 'returns expected value' );
9090

9191
t.end();
9292
});

0 commit comments

Comments
 (0)