File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed
lib/node_modules/@stdlib/stats/base/dists/rayleigh/stdev Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change 3838 "libraries" : [],
3939 "libpath" : [],
4040 "dependencies" : [
41- " @stdlib/constants/float64/sqrt-two" ,
4241 " @stdlib/math/base/napi/unary" ,
43- " @stdlib/math/base/assert/is-nan" ,
44- " @stdlib/math/base/special/sqrt" ,
45- " @stdlib/constants/float64/pi"
42+ " @stdlib/math/base/assert/is-nan"
4643 ]
4744 },
4845 {
5855 "libpath" : [],
5956 "dependencies" : [
6057 " @stdlib/math/base/assert/is-nan" ,
61- " @stdlib/math/base/special/sqrt" ,
62- " @stdlib/constants/float64/pi" ,
6358 " @stdlib/constants/float64/eps"
6459 ]
6560 },
7570 "libraries" : [],
7671 "libpath" : [],
7772 "dependencies" : [
78- " @stdlib/math/base/assert/is-nan" ,
79- " @stdlib/math/base/special/sqrt" ,
80- " @stdlib/constants/float64/pi"
73+ " @stdlib/math/base/assert/is-nan"
8174 ]
8275 }
8376 ]
Original file line number Diff line number Diff line change 1818
1919#include "stdlib/stats/base/dists/rayleigh/stdev.h"
2020#include "stdlib/math/base/assert/is_nan.h"
21- #include "stdlib/math/base/special/sqrt.h"
22- #include "stdlib/constants/float64/pi.h"
2321
24- #define STDLIB_CONSTANT_FLOAT64_SQRT2 1.4142135623730950488
22+ static const double STDLIB_CONSTANT_FLOAT64_SQRT2 = 1.4142135623730950488 ;
23+ static const double SQRT4MPI = 0.9265027503522085 ;
2524
2625/**
2726* Returns the standard deviation of a Rayleigh distribution.
3433* // returns ~5.896
3534*/
3635double stdlib_base_dists_rayleigh_stdev ( const double sigma ) {
37- const double SQRT4MPI = stdlib_base_sqrt ( 4 - STDLIB_CONSTANT_FLOAT64_PI );
3836 if (
3937 stdlib_base_is_nan ( sigma ) ||
4038 sigma < 0.0
You can’t perform that action at this time.
0 commit comments