Skip to content

Commit

Permalink
docs: resolve C lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Apr 18, 2023
1 parent 28e1c84 commit b9e414a
Show file tree
Hide file tree
Showing 65 changed files with 117 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ float stdlib_base_cabs2f( const float complex z );
#include <complex.h>
int main( void ) {
float complex x[] = { 3.14f+1.0f*I, -3.14f-1.0f*I, 0.0f+0.0f*I, 0.0f/0.0f+0.0f/0.0f*I };
const float complex x[] = { 3.14f+1.0f*I, -3.14f-1.0f*I, 0.0f+0.0f*I, 0.0f/0.0f+0.0f/0.0f*I };
float complex v;
float y;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/cabsf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ float stdlib_base_cabsf( const float complex z );
#include <complex.h>
int main( void ) {
float complex x[] = { 3.14f+1.0f*I, -3.14f-1.0f*I, 0.0f+0.0f*I, 0.0f/0.0f+0.0f/0.0f*I };
const float complex x[] = { 3.14f+1.0f*I, -3.14f-1.0f*I, 0.0f+0.0f*I, 0.0f/0.0f+0.0f/0.0f*I };
float complex v;
float y;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/cbrt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ double stdlib_base_cbrt( const double x );
#include <stdio.h>
int main( void ) {
double x[] = { 3.14, 9.00, 0.0, 0.0/0.0 };
const double x[] = { 3.14, 9.00, 0.0, 0.0/0.0 };
double y;
int i;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/cbrtf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ float stdlib_base_cbrtf( const float x );
#include <stdio.h>
int main( void ) {
float x[] = { 3.14f, 9.00f, 0.0f, 0.0f/0.0f };
const float x[] = { 3.14f, 9.00f, 0.0f, 0.0f/0.0f };
float y;
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ float complex stdlib_base_cceilf( const float complex z );
#include <complex.h>
int main( void ) {
float complex x[] = { 3.14f+1.5f*I, -3.14f-1.5f*I, 0.0f+0.0f*I, 0.0f/0.0f+0.0f/0.0f*I };
const float complex x[] = { 3.14f+1.5f*I, -3.14f-1.5f*I, 0.0f+0.0f*I, 0.0f/0.0f+0.0f/0.0f*I };
float complex v;
float complex y;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/ceil/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ double stdlib_base_ceil( const double x );
#include <stdio.h>
int main( void ) {
double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 };
const double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 };
double y;
int i;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/ceilf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ float stdlib_base_ceilf( const float x );
#include <stdio.h>
int main( void ) {
float x[] = { 3.14f, -3.14f, 0.0f, 0.0f/0.0f };
const float x[] = { 3.14f, -3.14f, 0.0f, 0.0f/0.0f };
float y;
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ double complex stdlib_base_cflipsign( const double complex z, const double y );
#include <complex.h>
int main( void ) {
double complex x[] = { 3.14+1.5*I, -3.14-1.5*I, 0.0+0.0*I, 0.0/0.0+0.0/0.0*I };
const double complex x[] = { 3.14+1.5*I, -3.14-1.5*I, 0.0+0.0*I, 0.0/0.0+0.0/0.0*I };
double complex v;
double complex y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ float complex stdlib_base_cflipsignf( const float complex z, const float y );
#include <complex.h>
int main( void ) {
float complex x[] = { 3.14f+1.5f*I, -3.14f-1.5f*I, 0.0f+0.0f*I, 0.0f/0.0f+0.0f/0.0f*I };
const float complex x[] = { 3.14f+1.5f*I, -3.14f-1.5f*I, 0.0f+0.0f*I, 0.0f/0.0f+0.0f/0.0f*I };
float complex v;
float complex y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ double complex stdlib_base_cidentity( const double complex z );
#include <complex.h>
int main( void ) {
double complex x[] = { 3.14+1.0*I, -3.14-1.0*I, 0.0+0.0*I, 0.0/0.0+0.0/0.0*I };
const double complex x[] = { 3.14+1.0*I, -3.14-1.0*I, 0.0+0.0*I, 0.0/0.0+0.0/0.0*I };
double complex v;
double complex y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ float complex stdlib_base_cidentityf( const float complex z );
#include <complex.h>
int main( void ) {
float complex x[] = { 3.14f+1.0f*I, -3.14f-1.0f*I, 0.0f+0.0f*I, 0.0f/0.0f+0.0f/0.0f*I };
const float complex x[] = { 3.14f+1.0f*I, -3.14f-1.0f*I, 0.0f+0.0f*I, 0.0f/0.0f+0.0f/0.0f*I };
float complex v;
float complex y;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/clamp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ double stdlib_base_clamp( const double v, const double min, const double max );
#include <stdio.h>
int main( void ) {
double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 };
const double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 };
double y;
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ float stdlib_base_clampf( const float v, const float min, const float max );
#include <stdio.h>
int main( void ) {
float x[] = { 3.14f, -3.14f, 0.0f, 0.0f/0.0f };
const float x[] = { 3.14f, -3.14f, 0.0f, 0.0f/0.0f };
float y;
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ double stdlib_base_copysign( const double x, const double y );
#include <stdio.h>
int main( void ) {
double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 };
const double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 };
double y;
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ float stdlib_base_copysignf( const float x, const float y );
#include <stdio.h>
int main( void ) {
float x[] = { 3.0f, -3.0f, 0.0f, 0.0f/0.0f };
const float x[] = { 3.0f, -3.0f, 0.0f, 0.0f/0.0f };
float y;
int i;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/cosh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ double stdlib_base_cosh( const double x );
int main( void ) {
const double x[] = { -5.0, -3.89, -2.78, -1.67, -0.56, 0.56, 1.67, 2.78, 3.89, 5.0 };
double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_cosh( x[ i ] );
printf( "cosh(%lf) = %lf\n", x[ i ], v );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

int main( void ) {
const double x[] = { -5.0, -3.89, -2.78, -1.67, -0.56, 0.56, 1.67, 2.78, 3.89, 5.0 };

double v;
int i;

for ( i = 0; i < 10; i++ ) {
v = stdlib_base_cosh( x[ i ] );
printf( "cosh(%lf) = %lf\n", x[ i ], v );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ double stdlib_base_deg2rad( const double x );
#include <stdio.h>
int main( void ) {
double x[] = { 45.0, 90.0, 0.0, 0.0/0.0 };
const double x[] = { 45.0, 90.0, 0.0, 0.0/0.0 };
double y;
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ float stdlib_base_deg2radf( const float x );
#include <stdio.h>
int main( void ) {
float x[] = { 45.0f, 90.0f, 0.0f, 0.0f/0.0f };
const float x[] = { 45.0f, 90.0f, 0.0f, 0.0f/0.0f };
float y;
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ double stdlib_base_dirac_delta( const double x );
#include <stdio.h>
int main( void ) {
double x[] = { -1.0, -0.5, 0.0, 0.5, 1.0, 3.14, 2.0 };
const double x[] = { -1.0, -0.5, 0.0, 0.5, 1.0, 3.14, 2.0 };
double v;
int i;
for ( i = 0; i < 7; i++ ) {
v = stdlib_base_dirac_delta( x[ i ] );
printf( "dirac(%lf) = %lf\n", x[ i ], v );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
#include <stdio.h>

int main( void ) {
double x[] = { -1.0, -0.5, 0.0, 0.5, 1.0, 3.14, 2.0 };
double v;
int i;
const double x[] = { -1.0, -0.5, 0.0, 0.5, 1.0, 3.14, 2.0 };

for ( i = 0; i < 7; i++ ) {
v = stdlib_base_dirac_delta( x[ i ] );
printf( "dirac(%lf) = %lf\n", x[ i ], v );
}
double v;
int i;
for ( i = 0; i < 7; i++ ) {
v = stdlib_base_dirac_delta( x[ i ] );
printf( "dirac(%lf) = %lf\n", x[ i ], v );
}
}
5 changes: 2 additions & 3 deletions lib/node_modules/@stdlib/math/base/special/erf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,13 @@ double stdlib_base_erf( const double x );
```c
#include "stdlib/math/base/special/erf.h"
#include <stdlib.h>
#include <stdio.h>
int main( void ) {
double x[] = { -10.0, -7.78, -5.56, -3.33, -1.11, 1.11, 3.33, 5.56, 7.78, 10.0 };
const double x[] = { -10.0, -7.78, -5.56, -3.33, -1.11, 1.11, 3.33, 5.56, 7.78, 10.0 };
double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_erf( x[ i ] );
printf( "x: %lf, erf(x): %lf\n", x[ i ], v );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@
*/

#include "stdlib/math/base/special/erf.h"
#include <stdlib.h>
#include <stdio.h>

int main( void ) {
double x[] = { -10.0, -7.78, -5.56, -3.33, -1.11, 1.11, 3.33, 5.56, 7.78, 10.0 };
double v;
int i;
const double x[] = { -10.0, -7.78, -5.56, -3.33, -1.11, 1.11, 3.33, 5.56, 7.78, 10.0 };

for ( i = 0; i < 10; i++ ) {
v = stdlib_base_erf( x[ i ] );
printf( "x: %lf, erf(x): %lf\n", x[ i ], v );
}
double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_erf( x[ i ] );
printf( "x: %lf, erf(x): %lf\n", x[ i ], v );
}
}
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/math/base/special/erfc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ double stdlib_base_erfc( const double x );
#include <stdio.h>
int main( void ) {
double x[] = { -10.0, -7.78, -5.56, -3.33, -1.11, 1.11, 3.33, 5.56, 7.78, 10.0 };
const double x[] = { -10.0, -7.78, -5.56, -3.33, -1.11, 1.11, 3.33, 5.56, 7.78, 10.0 };
double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_erfc( x[ i ] );
printf( "x: %lf, erfc(x): %lf\n", x[ i ], v );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
#include <stdio.h>

int main( void ) {
double x[] = { -10.0, -7.78, -5.56, -3.33, -1.11, 1.11, 3.33, 5.56, 7.78, 10.0 };
double v;
int i;
const double x[] = { -10.0, -7.78, -5.56, -3.33, -1.11, 1.11, 3.33, 5.56, 7.78, 10.0 };

for ( i = 0; i < 10; i++ ) {
v = stdlib_base_erfc( x[ i ] );
printf( "x: %lf, erfc(x): %lf\n", x[ i ], v );
}
double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_erfc( x[ i ] );
printf( "x: %lf, erfc(x): %lf\n", x[ i ], v );
}
}
5 changes: 2 additions & 3 deletions lib/node_modules/@stdlib/math/base/special/erfcinv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,13 @@ double stdlib_base_erfcinv( const double x );
```c
#include "stdlib/math/base/special/erfcinv.h"
#include <stdlib.h>
#include <stdio.h>
int main( void ) {
double x[] = { 0.0, 0.22, 0.44, 0.67, 0.89, 1.11, 1.33, 1.56, 1.78, 2.0 };
const double x[] = { 0.0, 0.22, 0.44, 0.67, 0.89, 1.11, 1.33, 1.56, 1.78, 2.0 };
double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_erfcinv( x[ i ] );
printf( "x: %lf, erfcinv(x): %lf\n", x[ i ], v );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@
*/

#include "stdlib/math/base/special/erfcinv.h"
#include <stdlib.h>
#include <stdio.h>

int main( void ) {
double x[] = { 0.0, 0.22, 0.44, 0.67, 0.89, 1.11, 1.33, 1.56, 1.78, 2.0 };
double v;
int i;
const double x[] = { 0.0, 0.22, 0.44, 0.67, 0.89, 1.11, 1.33, 1.56, 1.78, 2.0 };

for ( i = 0; i < 10; i++ ) {
v = stdlib_base_erfcinv( x[ i ] );
printf( "x: %lf, erfcinv(x): %lf\n", x[ i ], v );
}
double v;
int i;
for ( i = 0; i < 10; i++ ) {
v = stdlib_base_erfcinv( x[ i ] );
printf( "x: %lf, erfcinv(x): %lf\n", x[ i ], v );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ double stdlib_base_flipsign( const double x, const double y );
#include <stdio.h>
int main( void ) {
double x[] = { 3.0, -3.0, 0.0, 0.0/0.0 };
const double x[] = { 3.0, -3.0, 0.0, 0.0/0.0 };
double y;
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ float stdlib_base_flipsignf( const float x, const float y );
#include <stdio.h>
int main( void ) {
float x[] = { 3.0f, -3.0f, 0.0f, 0.0f/0.0f };
const float x[] = { 3.0f, -3.0f, 0.0f, 0.0f/0.0f };
float y;
int i;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/floor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ double stdlib_base_floor( const double x );
#include <stdio.h>
int main( void ) {
double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 };
const double x[] = { 3.14, -3.14, 0.0, 0.0/0.0 };
double y;
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ float stdlib_base_floor( const float x );
#include <stdio.h>
int main( void ) {
float x[] = { 3.14f, -3.14f, 0.0f, 0.0f/0.0f };
const float x[] = { 3.14f, -3.14f, 0.0f, 0.0f/0.0f };
float y;
int i;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/frexp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void stdlib_base_frexp( const double x, double *frac, int32_t *exp );
#include <inttypes.h>

int main( void ) {
double x[] = { 4.0, 0.0, -0.0, 1.0, -1.0, 3.14, -3.14, 1.0e308, -1.0e308, 1.0/0.0, -1.0/0.0, 0.0/0.0 };
const double x[] = { 4.0, 0.0, -0.0, 1.0, -1.0, 3.14, -3.14, 1.0e308, -1.0e308, 1.0/0.0, -1.0/0.0, 0.0/0.0 };

double frac;
int32_t exp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <inttypes.h>

int main( void ) {
double x[] = { 4.0, 0.0, -0.0, 1.0, -1.0, 3.14, -3.14, 1.0e308, -1.0e308, 1.0/0.0, -1.0/0.0, 0.0/0.0 };
const double x[] = { 4.0, 0.0, -0.0, 1.0, -1.0, 3.14, -3.14, 1.0e308, -1.0e308, 1.0/0.0, -1.0/0.0, 0.0/0.0 };

double frac;
int32_t exp;
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/math/base/special/hypot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ double stdlib_base_hypot( const double x, const double y );
#include <stdio.h>

int main( void ) {
double x[] = { 3.0, 4.0, 5.0, 12.0 };
const double x[] = { 3.0, 4.0, 5.0, 12.0 };

double y;
int i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ float stdlib_base_hypotf( const float x, const float y );
#include <stdio.h>
int main( void ) {
float x[] = { 3.0f, 4.0f, 5.0f, 12.0f };
const float x[] = { 3.0f, 4.0f, 5.0f, 12.0f };
float y;
int i;
Expand Down
Loading

0 comments on commit b9e414a

Please sign in to comment.