Skip to content
Open
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 @@ -139,7 +139,7 @@ var opts = {
};
var sigma = uniform( 10, 0.0, 20.0, opts );
var mu = uniform( 10, -5.0, 5.0, opts );
var t = uniform( 10, 0.0, 10.0, opts );
var t = uniform( 10, -10.0, 10.0, opts );

logEachMap( 't: %0.4f, µ: %0.4f, σ: %0.4f, M_X(t;µ,σ): %0.4f', t, mu, sigma, mgf );
```
Expand Down Expand Up @@ -230,7 +230,7 @@ int main( void ) {
int i;

for ( i = 0; i < 10; i++ ) {
t = random_uniform( 0.0, 1.0 );
t = random_uniform( -10.0, 10.0 );
mu = random_uniform( -50.0, 50.0 );
sigma = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
y = stdlib_base_dists_normal_mgf( t, mu, sigma );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bench( pkg, function benchmark( b ) {
opts = {
'dtype': 'float64'
};
t = uniform( 100, 0.0, 1.0, opts );
t = uniform( 100, -10.0, 10.0, opts );
mu = uniform( 100, -50.0, 50.0, opts );
sigma = uniform( 100, EPS, 20.0, opts );

Expand Down Expand Up @@ -73,7 +73,7 @@ bench( format( '%s::factory', pkg ), function benchmark( b ) {
sigma = 1.5;
mymgf = mgf.factory( mu, sigma );

t = uniform( 100, 0.0, 1.0, {
t = uniform( 100, -10.0, 10.0, {
'dtype': 'float64'
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ bench( format( '%s::native', pkg ), opts, function benchmark( b ) {
opts = {
'dtype': 'float64'
};
t = uniform( 100, 0.0, 1.0, opts );
t = uniform( 100, -10.0, 10.0, opts );
mu = uniform( 100, -50.0, 50.0, opts );
sigma = uniform( 100, EPS, 20.0, opts );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int main( void ) {
int i;

for ( i = 0; i < 10; i++ ) {
t = random_uniform( 0.0, 1.0 );
t = random_uniform( -10.0, 10.0 );
mu = random_uniform( -50.0, 50.0 );
sigma = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
y = stdlib_base_dists_normal_mgf( t, mu, sigma );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ var opts = {
};
var sigma = uniform( 10, 0.0, 20.0, opts );
var mu = uniform( 10, -5.0, 5.0, opts );
var t = uniform( 10, 0.0, 10.0, opts );
var t = uniform( 10, -10.0, 10.0, opts );

logEachMap( 't: %0.4f, µ: %0.4f, σ: %0.4f, M_X(t;µ,σ): %0.4f', t, mu, sigma, mgf );
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Generate fixture data and write to file.
# Examples

``` julia
julia> x = rand( 1000 ) .* 15;
julia> x = ( rand(1000) .* 30.0 ) .- 15.0;
julia> mu = rand( 1000 ) .* -10.0;
julia> sigma = rand( 1000 ) .* 5.0;
julia> gen( x, mu, sigma, "data.json" );
Expand Down Expand Up @@ -71,19 +71,19 @@ file = @__FILE__;
dir = dirname( file );

# Negative mean:
x = rand( 1000 ) .* 20.0;
x = ( rand(1000) .* 40.0 ) .- 20.0;
mu = rand( 1000 ) .* -10.0;
sigma = rand( 1000 ) .* 5.0;
gen( x, mu, sigma, "negative_location.json" );

# Positive mean:
x = rand( 1000 ) .* 20.0;
x = ( rand(1000) .* 40.0 ) .- 20.0;
mu = rand( 1000 ) .* 10.0;
sigma = rand( 1000 ) .* 5.0;
gen( x, mu, sigma, "positive_location.json" );

# Large variance:
x = rand( 1000 ) .* 10.0;
x = ( rand(1000) .* 20.0 ) .- 10.0;
mu = rand( 1000 );
sigma = rand( 1000 ) .* 20.0;
gen( x, mu, sigma, "large_variance.json" );