Skip to content

Commit

Permalink
style: update to use tabs for indentation
Browse files Browse the repository at this point in the history
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: passed
  - task: lint_c_examples
    status: passed
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: na
  - task: lint_typescript_tests
    status: na
  - task: lint_license_headers
    status: passed
---
  • Loading branch information
Planeshifter committed Dec 23, 2024
1 parent a72a67a commit 2ea848b
Show file tree
Hide file tree
Showing 31 changed files with 211 additions and 211 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_FLOAT( env, alpha, argv, 1)
STDLIB_NAPI_ARGV_FLOAT( env, alpha, argv, 1)
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 2 );
STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_strided_sapxsumkbn2( N, alpha, X, stride ), v );
Expand Down
26 changes: 13 additions & 13 deletions lib/node_modules/@stdlib/blas/ext/base/snansumpw/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
* @return Node-API value
*/
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 3 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 1 );
STDLIB_NAPI_CREATE_DOUBLE( env, (double)API_SUFFIX(stdlib_strided_snansumpw)( N, X, strideX ), v );
return v;
STDLIB_NAPI_ARGV( env, info, argv, argc, 3 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 1 );
STDLIB_NAPI_CREATE_DOUBLE( env, (double)API_SUFFIX(stdlib_strided_snansumpw)( N, X, strideX ), v );
return v;
}

/**
Expand All @@ -49,13 +49,13 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
* @return Node-API value
*/
static napi_value addon_method( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 1 );
STDLIB_NAPI_CREATE_DOUBLE( env, (double)API_SUFFIX(stdlib_strided_snansumpw_ndarray)( N, X, strideX, offsetX ), v );
return v;
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 1 );
STDLIB_NAPI_CREATE_DOUBLE( env, (double)API_SUFFIX(stdlib_strided_snansumpw_ndarray)( N, X, strideX, offsetX ), v );
return v;
}

STDLIB_NAPI_MODULE_EXPORT_FCN_WITH_METHOD( addon, "ndarray", addon_method );
16 changes: 8 additions & 8 deletions lib/node_modules/@stdlib/blas/ext/base/ssort2ins/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
* @return Node-API value
*/
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 6 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV( env, info, argv, argc, 6 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_FLOAT( env, order, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 5 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, Y, N, strideY, argv, 4 );
c_ssort2ins( N, order, X, strideX, Y, strideY );
return NULL;
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 5 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, Y, N, strideY, argv, 4 );
c_ssort2ins( N, order, X, strideX, Y, strideY );
return NULL;
}

STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
Expand Down
8 changes: 4 additions & 4 deletions lib/node_modules/@stdlib/blas/ext/base/ssortins/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
* @return Node-API value
*/
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_FLOAT( env, order, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 2 );
c_ssortins( N, order, X, stride );
return NULL;
c_ssortins( N, order, X, stride );
return NULL;
}

STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
* // returns false
*/
bool stdlib_base_is_evenf( const float x ) {
return stdlib_base_is_integerf( x / 2.0f );
return stdlib_base_is_integerf( x / 2.0f );
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
* // returns true
*/
bool stdlib_base_is_integer( const double x ) {
return ( x == stdlib_base_floor( x ) );
return ( x == stdlib_base_floor( x ) );
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#include <stdbool.h>

int main( void ) {
float x;
bool v;
int i;
float x;
bool v;
int i;

for ( i = 0; i < 100; i++ ) {
x = ( ( (float)rand() / (float)RAND_MAX ) * 100.0f ) - 50.0f;
v = stdlib_base_is_integerf( x );
printf( "x = %f, is_integer(x) = %s\n", x, ( v ) ? "true" : "false" );
}
for ( i = 0; i < 100; i++ ) {
x = ( ( (float)rand() / (float)RAND_MAX ) * 100.0f ) - 50.0f;
v = stdlib_base_is_integerf( x );
printf( "x = %f, is_integer(x) = %s\n", x, ( v ) ? "true" : "false" );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
* // returns true
*/
bool stdlib_base_is_integerf( const float x ) {
return ( x == stdlib_base_floorf( x ) );
return ( x == stdlib_base_floorf( x ) );
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
* // returns false
*/
bool stdlib_base_is_nonpositive_integer( const double x ) {
return ( stdlib_base_floor( x ) == x && x <= 0 );
return ( stdlib_base_floor( x ) == x && x <= 0 );
}
6 changes: 3 additions & 3 deletions lib/node_modules/@stdlib/math/base/assert/is-prime/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#include <stdint.h>

static const double WHEEL_PRIMES[45] = {
11.0, 13.0, 17.0, 19.0, 23.0, 29.0, 31.0, 37.0, 41.0, 43.0, 47.0, 53.0, 59.0, 61.0, 67.0, 71.0, 73.0, 79.0, 83.0, 89.0, 97.0,
101.0, 103.0, 107.0, 109.0, 113.0, 127.0, 131.0, 137.0, 139.0, 149.0, 151.0, 157.0, 163.0, 167.0, 173.0, 179.0, 181.0,
191.0, 193.0, 197.0, 199.0, 211.0
11.0, 13.0, 17.0, 19.0, 23.0, 29.0, 31.0, 37.0, 41.0, 43.0, 47.0, 53.0, 59.0, 61.0, 67.0, 71.0, 73.0, 79.0, 83.0, 89.0, 97.0,
101.0, 103.0, 107.0, 109.0, 113.0, 127.0, 131.0, 137.0, 139.0, 149.0, 151.0, 157.0, 163.0, 167.0, 173.0, 179.0, 181.0,
191.0, 193.0, 197.0, 199.0, 211.0
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#include <stdbool.h>

int main( void ) {
double x;
bool v;
int i;
for ( i = 0; i < 100; i++ ) {
x = ( ( (double)rand() / (double)RAND_MAX ) * 2.0 ) - 1.0;
v = stdlib_base_is_probability( x );
printf( "%lf is %sa probability\n", x, ( v ) ? "" : "not " );
}
double x;
bool v;
int i;

for ( i = 0; i < 100; i++ ) {
x = ( ( (double)rand() / (double)RAND_MAX ) * 2.0 ) - 1.0;
v = stdlib_base_is_probability( x );
printf( "%lf is %sa probability\n", x, ( v ) ? "" : "not " );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
#include <stdio.h>

int main( void ) {
double x;
double v;
int i;
double x;
double v;
int i;

for ( i = 0; i < 100; i++ ) {
for ( i = 0; i < 100; i++ ) {
x = ( ( (double)rand() / (double)RAND_MAX ) * 10.0 ) - 5.0;
v = stdlib_base_expm1( x );
printf( "e^%lf - 1 = %lf\n", x, v );
}
v = stdlib_base_expm1( x );
printf( "e^%lf - 1 = %lf\n", x, v );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
#include <stdio.h>

int main( void ) {
double x;
double v;
int i;
for ( i = 0; i < 100; i++ ) {
x = ( ( (double)rand() / (double)RAND_MAX ) * 100.0 ) - 50.0;
v = stdlib_base_expm1rel( x );
printf( "(e^%lf - 1)/%lf = %lf\n", x, x, v );
}
double x;
double v;
int i;

for ( i = 0; i < 100; i++ ) {
x = ( ( (double)rand() / (double)RAND_MAX ) * 100.0 ) - 50.0;
v = stdlib_base_expm1rel( x );
printf( "(e^%lf - 1)/%lf = %lf\n", x, x, v );
}
}
12 changes: 6 additions & 6 deletions lib/node_modules/@stdlib/math/base/special/fmodf/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
* The following copyright and license were part of the original implementation available as part of [Openlibm]{@link https://github.com/JuliaMath/openlibm/blob/master/src/e_fmodf.c}. The implementation follows the original, but has been modified for use in stdlib.
*
* ```text
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunSoft, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunSoft, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ```
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#include <inttypes.h>

int main( void ) {
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 };
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;
int i;
for ( i = 0; i < 12; i++ ) {
stdlib_base_frexp( x[i], &frac, &exp );
printf( "x: %f => frac: %f, exp: %" PRId32 "\n", x[i], frac, exp );
}
double frac;
int32_t exp;
int i;
for ( i = 0; i < 12; i++ ) {
stdlib_base_frexp( x[i], &frac, &exp );
printf( "x: %f => frac: %f, exp: %" PRId32 "\n", x[i], frac, exp );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
#include <stdio.h>

int main( void ) {
const double x[] = { -0.7853981633974483, -0.6108652381980153, -0.4363323129985824, -0.26179938779914946, -0.08726646259971649, 0.08726646259971649, 0.26179938779914935, 0.43633231299858233, 0.6108652381980153, 0.7853981633974483 };
double out;
int i;
for ( i = 0; i < 10; i++ ) {
out = stdlib_base_kernel_sin( x[ i ], 0.0 );
printf ( "x: %lf, y: %lf, out: %lf\n", x[ i ], 0.0, out );
}
const double x[] = { -0.7853981633974483, -0.6108652381980153, -0.4363323129985824, -0.26179938779914946, -0.08726646259971649, 0.08726646259971649, 0.26179938779914935, 0.43633231299858233, 0.6108652381980153, 0.7853981633974483 };

double out;
int i;
for ( i = 0; i < 10; i++ ) {
out = stdlib_base_kernel_sin( x[ i ], 0.0 );
printf ( "x: %lf, y: %lf, out: %lf\n", x[ i ], 0.0, out );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
#include <stdio.h>

int main( void ) {
double out;
double x;
int i;
double out;
double x;
int i;

for ( i = 0; i < 100; i++ ) {
x = ( (double)rand() / (double)RAND_MAX ) * 100.0;
out = stdlib_base_ln( x );
printf( "ln(%lf) = %lf\n", x, out );
}
for ( i = 0; i < 100; i++ ) {
x = ( (double)rand() / (double)RAND_MAX ) * 100.0;
out = stdlib_base_ln( x );
printf( "ln(%lf) = %lf\n", x, out );
}
}
24 changes: 12 additions & 12 deletions lib/node_modules/@stdlib/math/base/special/logaddexp/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
* // returns ~90.6931
*/
double stdlib_base_logaddexp( const double x, const double y ) {
double d;
if ( stdlib_base_is_nan( x ) || stdlib_base_is_nan( y ) ) {
return 0.0/0.0;
}
if ( x == y ) {
return x + STDLIB_CONSTANT_FLOAT64_LN2;
}
d = x - y;
if ( d > 0.0 ) {
return x + stdlib_base_log1p( stdlib_base_exp( -d ) );
}
return y + stdlib_base_log1p( stdlib_base_exp( d ) );
double d;
if ( stdlib_base_is_nan( x ) || stdlib_base_is_nan( y ) ) {
return 0.0/0.0;
}
if ( x == y ) {
return x + STDLIB_CONSTANT_FLOAT64_LN2;
}
d = x - y;
if ( d > 0.0 ) {
return x + stdlib_base_log1p( stdlib_base_exp( -d ) );
}
return y + stdlib_base_log1p( stdlib_base_exp( d ) );
}
20 changes: 10 additions & 10 deletions lib/node_modules/@stdlib/math/base/special/max/examples/c/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
#include <stdio.h>

int main( void ) {
double x;
double y;
double v;
int i;
double x;
double y;
double v;
int i;

for ( i = 0; i < 100; i++ ) {
x = ( ( (double)rand() / (double)RAND_MAX ) * 200.0 ) - 100.0;
y = ( ( (double)rand() / (double)RAND_MAX ) * 200.0 ) - 100.0;
v = stdlib_base_max( x, y );
printf( "x: %lf, y: %lf, max(x, y): %lf\n", x, y, v );
}
for ( i = 0; i < 100; i++ ) {
x = ( ( (double)rand() / (double)RAND_MAX ) * 200.0 ) - 100.0;
y = ( ( (double)rand() / (double)RAND_MAX ) * 200.0 ) - 100.0;
v = stdlib_base_max( x, y );
printf( "x: %lf, y: %lf, max(x, y): %lf\n", x, y, v );
}
}
32 changes: 16 additions & 16 deletions lib/node_modules/@stdlib/math/base/special/maxf/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@
* // returns 0.0f
*/
float stdlib_base_maxf( const float x, const float y ) {
if ( stdlib_base_is_nanf( x ) || stdlib_base_is_nanf( y ) ) {
return 0.0f / 0.0f; // NaN
}
if ( x == STDLIB_CONSTANT_FLOAT32_PINF || y == STDLIB_CONSTANT_FLOAT32_PINF ) {
return STDLIB_CONSTANT_FLOAT32_PINF;
}
if ( x == y && x == 0.0f ) {
if ( stdlib_base_is_positive_zerof( x ) ) {
return x;
}
return y;
}
if ( x > y ) {
return x;
}
return y;
if ( stdlib_base_is_nanf( x ) || stdlib_base_is_nanf( y ) ) {
return 0.0f / 0.0f; // NaN
}
if ( x == STDLIB_CONSTANT_FLOAT32_PINF || y == STDLIB_CONSTANT_FLOAT32_PINF ) {
return STDLIB_CONSTANT_FLOAT32_PINF;
}
if ( x == y && x == 0.0f ) {
if ( stdlib_base_is_positive_zerof( x ) ) {
return x;
}
return y;
}
if ( x > y ) {
return x;
}
return y;
}
Loading

0 comments on commit 2ea848b

Please sign in to comment.