Skip to content

Fast real valued Lambert W and Wright omega functions for Julia.

License

Notifications You must be signed in to change notification settings

Remotion/ReLambertW.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReLambertW

Lambert W function

Wright omega function

Julia module to compute real valued Lambert-W Function also known as product-log.

Fast real valued Wright omega function is included as well.

Lambert W is the solution to the equation w*exp(w) = x.

Wright omega function is the solution to the equation y + ln(y) = x

Functions: lambertw0(z), lambertwm1(z), womega(z) Constants: omega, Ω

Math

$$x^x = c \ \ \ \ \ x = \exp(W_{0}(\ln(c)))$$

$$ x^\sqrt[n]{x} = c \ \ \ \ \ x = \exp\left( nW_{0}(\frac{\ln(c)}{n}) \right) $$

Examples

julia> W₀(x) = lambertw0(x);
julia> W₋₁(x) = lambertwm1(x);
julia> ω(x) = womega(x);

julia> womega(0)
0.5671432904097838

julia> womega(big(0))
0.567143290409783872999968662210355549753815787186512508135131079223045793086683

julia> lambertw0(1)
0.5671432904097838

julia> lambertwm1(-exp(-1))
-1.0

julia> omega
Ω = 0.5671432904097...

julia> big(omega)
0.567143290409783872999968662210355549753815787186512508135131079223045793086683

julia> omega * exp(omega)
1.0

julia> womega(987) + log(womega(987))
987.0000000000001

julia> womega(big(987)) + log(womega(big(987)))
987.0  

References

About

Fast real valued Lambert W and Wright omega functions for Julia.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages