Skip to content

Commit bdc3bdf

Browse files
committed
lambertw(): make maxiter a keyword
1 parent 5986f41 commit bdc3bdf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lambertw.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#### Lambert W function ####
22

33
"""
4-
lambertw(z::Number, k::Integer=0, maxits=1000)
4+
lambertw(z::Number, k::Integer=0; [maxiter=1000])
55
6-
Compute the `k`th branch of the Lambert W function of `z`. If `z` is real, `k` must be
6+
Compute the `k`th branch of the [Lambert W function](https://en.wikipedia.org/wiki/Lambert_W_function) of `z`. If `z` is real, `k` must be
77
either `0` or `-1`. For `Real` `z`, the domain of the branch `k = -1` is `[-1/e, 0]` and the
88
domain of the branch `k = 0` is `[-1/e, Inf]`. For `Complex` `z`, and all `k`, the domain is
99
the complex plane.
@@ -25,7 +25,7 @@ julia> lambertw(Complex(-10.0, 3.0), 4)
2525
-0.9274337508660128 + 26.37693445371142im
2626
```
2727
"""
28-
lambertw(z::Number, k::Integer=0, maxits::Integer=1000) = _lambertw(float(z), k, maxits)
28+
lambertw(z::Number, k::Integer=0; maxiter::Integer=1000) = _lambertw(z, k, maxiter)
2929

3030
# lambertw(e + 0im, k) is ok for all k
3131
# Maybe this should return a float. But, this should cause no type instability in any case

0 commit comments

Comments
 (0)