Skip to content

Commit

Permalink
Use UTF=8 so can get infinity symbol even in pure html.
Browse files Browse the repository at this point in the history
Bump Dates and NEWS
  • Loading branch information
aadler committed Nov 19, 2023
1 parent f615ffe commit e5a5cff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: lamW
Type: Package
Title: Lambert-W Function
Version: 2.2.2
Date: 2023-11-04
Date: 2023-11-20
Authors@R: c(person(given="Avraham", family="Adler",role=c("aut", "cph", "cre"),
email="Avraham.Adler@gmail.com", comment = c(ORCID = "0000-0002-3039-0703")))
Description: Implements both real-valued branches of the Lambert-W function
Expand Down
3 changes: 2 additions & 1 deletion inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
\title{NEWS file for the lamW package}
\encoding{UTF-8}

\section{Version 2.2.2 (2023-11-04)}{
\section{Version 2.2.2 (2023-11-20)}{
\subsection{Changed}{
\itemize{
\item \acronym{NEWS} was not rendering on \acronym{CRAN} because the file
name used lowercase, \file{News.Rd}, and not \file{NEWS.Rd}.
\item Tweaked documentation.
}
}
}
Expand Down
11 changes: 10 additions & 1 deletion man/lamW.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@
\alias{lambertW0}
\alias{lambertWm1}
\title{Lambert-W Function}
\encoding{UTF-8}

\description{
The Lambert-W function is defined as the multivalued inverse of the function
\eqn{z = f(W) = We^W}{z = f(W) = W * exp(W)}. The function has two branches. The
principal branch is defined on the interval
\eqn{\left[-\frac{1}{e}, \infty\right)}{[-1/e, Infinity)} and is always greater
\eqn{\left[-\frac{1}{e}, +\infty\right)}{[-1/e, +)} and is always greater
than or equal to \eqn{-1}. The second branch is defined on the interval
\eqn{\left[-\frac{1}{e}, 0\right)}{[-1/e, 0)} and is always less than or equal
to \eqn{-1}. The real-valued function is not defined for values less than
\eqn{-\frac{1}{e}}{-1/e}.
}

\usage{
lambertW0(x)
lambertWm1(x)
}

\arguments{
\item{x}{\strong{numeric} vector of values}}
\details{
Expand All @@ -35,12 +39,14 @@ simplifications. There are many applications in which the Lambert-W function is
useful, such as combinatorics, physics, and hydrology. The interested reader is
directed to the references for more detail.
}

\value{
Both functions return the appropriate values in the intervals for which they are
defined. Outside of those intervals, they will return \code{NaN}, except that
\code{lambertW0(Inf)} will return its limit \code{Inf} and \code{lambertWm1(0)}
will return its limit -\code{Inf}.
}

\references{
Corless, R. M., Gonnet, G. H., Hare, D. E., Jeffrey, D. J., Knuth, D. E.
1996 "On the Lambert W function", \emph{Advances in Computational Mathematics},
Expand All @@ -51,14 +57,17 @@ Fritsch, F. N.; Shafer, R. E. & Crowley, W. P.
\emph{Communications of the ACM}, \bold{16}, 123--124,
Association for Computing Machinery (ACM) <doi:10.1145/361952.361970>
}

\author{
Avraham Adler \email{Avraham.Adler@gmail.com}
}

\seealso{
This package provides similar functionality to the
\code{\link[gsl:Lambert]{Lambert}} functions in the \pkg{gsl} package without
having to obtain or install the entire \acronym{GSL}.
}

\examples{
lambertW0(exp(1)) ## Should equal 1, as 1 * exp(1) = e.
lambertW0(0) ## Should equal 0, as 0 * exp(0) = 0.
Expand Down

0 comments on commit e5a5cff

Please sign in to comment.