Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Math.Random.ExponentialDistribution

Generates a random number using exponential distribution.

Component Version macOS Windows Linux Server iOS SDK
Math 14.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Math.Random.ExponentialDistribution"; Lambda )   More

Parameters

Parameter Description Example
Lambda The lambda value to use. 1

Result

Returns number or error.

Description

Generates a random number using exponential distribution.
Produces random non-negative floating-point values, distributed according to probability density function.

Examples

Get a list of 10 values:

While(
    [
        count = 10;
        sum = 0;
        i = 0;
        list = ""
    ];
    i < count;
    [
        value = MBS( "Math.Random.ExponentialDistribution"; 1);
        sum = sum + value;
        list = list & value & ¶;
        i = i + 1
    ];
    list & ¶ & sum / count
)

Example result:
.16910840668022281141
1.5079774230697882142
.2888320615607430919
2.0216100924362199187
.37294949486881812106
.63787292339766532567
1.9894020598740280725
.33773532845065223906
1.5060101143393824774
.22260120426440432873

.90540991089419246006

See also

Release notes

Blog Entries

This function is free to use.

Created 2nd December 2023, last changed 2nd December 2023


Math.PolylineEncode - Math.Random.NormalDistribution

💬 Ask a question or report a problem