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 @@ -53,5 +53,5 @@ double stdlib_base_dists_arcsine_logcdf( const double x, const double a, const d
return 0.0;
}

return STDLIB_CONSTANT_FLOAT64_LN2 - STDLIB_CONSTANT_FLOAT64_LN_PI + ( stdlib_base_ln( stdlib_base_asin ( stdlib_base_sqrt ( ( x-a ) / ( b-a ) ) ) ) ) ;
return STDLIB_CONSTANT_FLOAT64_LN2 - STDLIB_CONSTANT_FLOAT64_LN_PI + stdlib_base_ln( stdlib_base_asin( stdlib_base_sqrt( ( x-a ) / ( b-a ) ) ) );
}
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ The function accepts the following arguments:
- **mu**: `[in] double` location parameter.
- **sigma**: `[in] double` scale parameter.


```c
double stdlib_base_dists_truncated_normal_pdf( const double x, const double a, const double b, const double mu, const double sigma );
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ extern "C" {
#endif

/**
* Evaluates the probability density function (PDF) for a truncated normal
* distribution with lower limit `a`, upper limit `b`, location parameter `mu`,
* and scale parameter `sigma`.
* Evaluates the probability density function (PDF) for a truncated normal distribution with lower limit `a`, upper limit `b`, location parameter `mu`, and scale parameter `sigma`.
*/
double stdlib_base_dists_truncated_normal_pdf( const double x, const double a, const double b, const double mu, const double sigma );

Expand Down
Original file line number Diff line number Diff line change
@@ -1,91 +1,91 @@
{
"options": {
"task": "build",
"wasm": false
"options": {
"task": "build",
"wasm": false
},
"fields": [
{
"field": "src",
"resolve": true,
"relative": true
},
"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/quinary",
"@stdlib/math/base/assert/is-nan",
"@stdlib/math/base/special/exp",
"@stdlib/math/base/special/abs2",
"@stdlib/constants/float64/pi",
"@stdlib/math/base/special/sqrt",
"@stdlib/stats/base/dists/normal/cdf"
]
},
{
"task": "benchmark",
"wasm": false,
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan",
"@stdlib/math/base/special/exp",
"@stdlib/math/base/special/abs2",
"@stdlib/constants/float64/pi",
"@stdlib/math/base/special/sqrt",
"@stdlib/stats/base/dists/normal/cdf"
]
},
{
"task": "examples",
"wasm": false,
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan",
"@stdlib/math/base/special/exp",
"@stdlib/math/base/special/abs2",
"@stdlib/constants/float64/pi",
"@stdlib/math/base/special/sqrt",
"@stdlib/stats/base/dists/normal/cdf"
]
}
]
{
"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/quinary",
"@stdlib/math/base/assert/is-nan",
"@stdlib/math/base/special/exp",
"@stdlib/math/base/special/abs2",
"@stdlib/constants/float64/pi",
"@stdlib/math/base/special/sqrt",
"@stdlib/stats/base/dists/normal/cdf"
]
},
{
"task": "benchmark",
"wasm": false,
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan",
"@stdlib/math/base/special/exp",
"@stdlib/math/base/special/abs2",
"@stdlib/constants/float64/pi",
"@stdlib/math/base/special/sqrt",
"@stdlib/stats/base/dists/normal/cdf"
]
},
{
"task": "examples",
"wasm": false,
"src": [
"./src/main.c"
],
"include": [
"./include"
],
"libraries": [],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan",
"@stdlib/math/base/special/exp",
"@stdlib/math/base/special/abs2",
"@stdlib/constants/float64/pi",
"@stdlib/math/base/special/sqrt",
"@stdlib/stats/base/dists/normal/cdf"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
#include "stdlib/constants/float64/pi.h"

/**
* Evaluates the probability density function (PDF) for a truncated normal distribution
* with endpoints `a` and `b`, location parameter `mu`, and scale parameter `sigma`
* at a value `x`.
* Evaluates the probability density function (PDF) for a truncated normal distribution with endpoints `a` and `b`, location parameter `mu`, and scale parameter `sigma` at a value `x`.
*
* @param x input value
* @param a minimum support
Expand Down