[#absl-Exponential]
= xref:absl.adoc[absl]::Exponential
:relfileprefix: ../
:mrdocs:

Produces a floating point value from an exponential distribution&period;

== Synopsis

Declared in `&lt;absl&sol;random&sol;distributions&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename RealType,
    typename URBG&gt;
RealType
Exponential(
    URBG&& urbg,
    RealType lambda = 1);
----

== Description

`absl&colon;&colon;Exponential` produces a floating point number representing the distance (time) between two consecutive events in a point process of events occurring continuously and independently at a constant average rate `lambda`&period; `T` must be a floating point type, but may be inferred from the type of `lambda`&period;

The mean of the distribution is 1&sol;`lambda`&period;

See https&colon;&sol;&sol;en&period;wikipedia&period;org&sol;wiki&sol;Exponential&lowbar;distribution&period;

Example&colon;

absl&colon;&colon;BitGen bitgen&semi; &period;&period;&period; double call&lowbar;length &equals; absl&colon;&colon;Exponential(bitgen, 7&period;0)&semi;

== Return Value

A random value drawn from the exponential distribution&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *urbg*
| The uniform random bit generator&period;
| *lambda*
| The constant average rate of events&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
