-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write documentation and unit tests, and update other documentation to…
… reference minimaxErr. Also remove Pade mention.
- Loading branch information
Showing
4 changed files
with
59 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
\name{minimaxErr} | ||
\alias{minimaxErr} | ||
\title{ | ||
Evaluate the Minimax Approximation Error | ||
} | ||
\description{ | ||
Evaluates the difference between the function and the minimax approximation at | ||
\code{x}. | ||
} | ||
\usage{ | ||
minimaxErr(x, mmA) | ||
} | ||
\arguments{ | ||
\item{x}{a numeric vector} | ||
\item{mmA}{a \code{"minimaxApprox"} return object} | ||
} | ||
\details{ | ||
This is a convenience function to evaluate the approximation error at \code{x}. | ||
} | ||
\value{ | ||
A vector of the same length as \code{x} containing the approximation error | ||
values. | ||
} | ||
\author{Avraham Adler \email{Avraham.Adler@gmail.com}} | ||
\seealso{\code{\link{minimaxApprox}}, \code{\link{minimaxEval}}} | ||
\examples{ | ||
# Show results | ||
x <- seq(0, 0.5, length.out = 11L) | ||
mmA <- minimaxApprox(exp, 0, 0.5, 5L) | ||
err <- minimaxEval(x, mmA) - exp(x) | ||
all.equal(err, minimaxErr(x, mmA)) | ||
|
||
# Plot results | ||
x <- seq(0, 0.5, length.out = 1001L) | ||
plot(x, minimaxErr(x, mmA), type = "l") | ||
} | ||
|
||
\keyword{NumericalMathematics} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters