Skip to content

Commit

Permalink
chore: minor clean-up
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: passed
  - 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
---

---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
  - task: run_javascript_examples
    status: na
  - task: run_c_examples
    status: passed
  - task: run_cpp_examples
    status: na
  - task: run_javascript_readme_examples
    status: na
  - task: run_c_benchmarks
    status: na
  - task: run_cpp_benchmarks
    status: na
  - task: run_fortran_benchmarks
    status: na
  - task: run_javascript_benchmarks
    status: na
  - task: run_julia_benchmarks
    status: na
  - task: run_python_benchmarks
    status: na
  - task: run_r_benchmarks
    status: na
  - task: run_javascript_tests
    status: passed
---
  • Loading branch information
Planeshifter committed Jan 20, 2025
1 parent d199580 commit 05b5326
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "stdlib/math/base/assert/is_nan.h"

/**
* Returns the mode for a raised cosine distribution with location `mu` and scale `s`.
* Returns the median for a raised cosine distribution with location `mu` and scale `s`.
*
* @param mu location parameter
* @param s scale parameter
Expand All @@ -31,7 +31,7 @@
* // returns 0.0
*/
double stdlib_base_dists_cosine_median( const double mu, const double s ) {
if (
if (
stdlib_base_is_nan( mu ) ||
stdlib_base_is_nan( s ) ||
s <= 0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ int main( void ) {
mu = random_uniform( -50.0, 50.0 );
s = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
y = stdlib_base_dists_cosine_skewness( mu, s );
printf( "µ: %lf, s: %lf, SD(X;µ,s): %lf\n", mu, s, y );
printf( "µ: %lf, s: %lf, skew(X;µ,s): %lf\n", mu, s, y );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"libpath": [],
"dependencies": [
"@stdlib/math/base/napi/binary",
"@stdlib/math/base/assert/is-nan",
"@stdlib/constants/float64/eps"
"@stdlib/math/base/assert/is-nan"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"dependencies": [
"@stdlib/math/base/napi/binary",
"@stdlib/math/base/assert/is-nan",
"@stdlib/constants/float64/eps",
"@stdlib/math/base/special/sqrt",
"@stdlib/constants/float64/pi-squared"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "stdlib/constants/float64/pi_squared.h"

/**
* Returns the mode for a raised cosine distribution with location `mu` and scale `s`.
* Returns the standard deviation for a raised cosine distribution with location `mu` and scale `s`.
*
* @param mu location parameter
* @param s scale parameter
Expand All @@ -33,7 +33,7 @@
* // returns ~0.362
*/
double stdlib_base_dists_cosine_stdev( const double mu, const double s ) {
if (
if (
stdlib_base_is_nan( mu ) ||
stdlib_base_is_nan( s ) ||
s <= 0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ tape( 'the function returns the standard deviation of a raised cosine distributi
t.equal( y, expected[i], 'mu:'+mu[i]+', s: '+s[i]+', y: '+y+', expected: '+expected[i] );
} else {
delta = abs( y - expected[ i ] );
tol = 2.0 * EPS * abs( expected[ i ] );
tol = 1.0 * EPS * abs( expected[ i ] );
t.ok( delta <= tol, 'within tolerance. mu: '+mu[i]+'. s: '+s[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ tape( 'the function returns the stdev of a raised cosine distribution', opts, fu
t.equal( y, expected[i], 'mu:'+mu[i]+', s: '+s[i]+', y: '+y+', expected: '+expected[i] );
} else {
delta = abs( y - expected[ i ] );
tol = 2.0 * EPS * abs( expected[ i ] );
tol = 1.0 * EPS * abs( expected[ i ] );
t.ok( delta <= tol, 'within tolerance. mu: '+mu[i]+'. s: '+s[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
}
}
Expand Down

0 comments on commit 05b5326

Please sign in to comment.