Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ int main( void ) {
for ( i = 0; i < 10; i++ ) {
p = random_uniform( 0.0, 1.0 );
y = stdlib_base_dists_bernoulli_skewness( p );
printf( "x: %lf , skew(X;p): %lf\n", p , y );
printf( "x: %lf, skew(X;p): %lf\n", p, y );
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ int main( void ) {
for ( i = 0; i < 10; i++ ) {
p = random_uniform( 0.0, 1.0 );
y = stdlib_base_dists_bernoulli_skewness( p );
printf( "x: %lf , skew(X;p): %lf\n", p , y );
printf( "x: %lf, skew(X;p): %lf\n", p, y );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C" {
#endif

/**
* Returns the skewness of a Bernoulli distribution with success probability 'p'.
* Returns the skewness of a Bernoulli distribution with success probability `p`.
*/
double stdlib_base_dists_bernoulli_skewness( const double p );

Expand Down
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
{
"options": {
"options": {
"task": "build",
"wasm": false
},
"fields": [
{
"field": "src",
"resolve": true,
"relative": true
},
{
"field": "include",
"resolve": true,
"relative": true
},
{
"field": "libraries",
"resolve": false,
"relative": false
},
{
"field": "libpath",
"resolve": true,
"relative": false
}
],
"confs": [
{
"task": "build",
"wasm": false
"wasm": false,
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/math/base/napi/unary",
"@stdlib/math/base/assert/is-nan",
"@stdlib/constants/float64/pinf",
"@stdlib/constants/float64/ninf",
"@stdlib/math/base/special/sqrt"
]
},
{
"task": "benchmark",
"wasm": false,
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan",
"@stdlib/constants/float64/pinf",
"@stdlib/constants/float64/ninf",
"@stdlib/math/base/special/sqrt"
]
},
"fields": [
{
"field": "src",
"resolve": true,
"relative": true
},
{
"field": "include",
"resolve": true,
"relative": true
},
{
"field": "libraries",
"resolve": false,
"relative": false
},
{
"field": "libpath",
"resolve": true,
"relative": false
}
],
"confs": [
{
"task": "build",
"wasm": false,
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/math/base/napi/unary",
"@stdlib/math/base/assert/is-nan",
"@stdlib/constants/float64/pinf",
"@stdlib/constants/float64/ninf",
"@stdlib/math/base/special/sqrt"
]
},
{
"task": "benchmark",
"wasm": false,
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan",
"@stdlib/constants/float64/pinf",
"@stdlib/constants/float64/ninf",
"@stdlib/math/base/special/sqrt"
]
},
{
"task": "examples",
"wasm": false,
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan",
"@stdlib/constants/float64/pinf",
"@stdlib/constants/float64/ninf",
"@stdlib/math/base/special/sqrt"
]
}
]
}
{
"task": "examples",
"wasm": false,
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan",
"@stdlib/constants/float64/pinf",
"@stdlib/constants/float64/ninf",
"@stdlib/math/base/special/sqrt"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

#include "stdlib/math/base/napi/unary.h"
#include "stdlib/stats/base/dists/bernoulli/skewness.h"
#include "stdlib/math/base/napi/unary.h"

// cppcheck-suppress shadowFunction
STDLIB_MATH_BASE_NAPI_MODULE_D_D( stdlib_base_dists_bernoulli_skewness )
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#include "stdlib/constants/float64/ninf.h"

/**
* Returns the skewness of a Bernoulli distribution with success probability 'p'.
* Returns the skewness of a Bernoulli distribution with success probability `p`.
*
* @param p success probability
* @returns skewness
* @return skewness
*
* @example
* double y = stdlib_base_dists_bernoulli_skewness( 0.1 );
Expand Down