Announcing Computational Methods for Numerical Analysis

For about two years, I’ve been working on a book called Computational Methods for Numerical Analysis with R (CMNA), which will present an outline of numerical analysis topics with original (and simplified) implementations in R at a level appropriate for a graduate student or advanced undergraduate. Last night, I sent the latest draft to my editors, and I am quite pleased to say it should be heading into production, soon. The organizational structure of the text is based roughly on the organizational structure of MAPL 460 15-20 years ago: Introduction to Numerical Analysis Error Analysis Linear Equations Interpolation and Extrapolation

Of Course NaN^0 = 1

David Smith and I are now talking to each other in blog posts and it is only a little weird. Also, I’ve been traveling and am a bit behind. In a comment on this post, he notes this: I suspect the reason why R Core adopted the 0^0=1 definition is because of the binomial justification, R being a stats package after all. I can’t think of any defense for NaN^0=1 though… Well, it turns out there’s a good reason. If we go back C, and try an experiment, we can observe the following example produces these results: Compiling and executing

NaN versus NA in R

R has two different ways of representing missing data and understanding each is important for the user. NaN means “not a number” and it means there is a result, but it cannot be represented in the computer. The second, NA, explains that the data is just missing for unknown reasons. These appear at different times when working with R and each has different implications. NaN is distinct from NA. NaN implies a result that cannot be calculated for whatever reason, or is not a floating point number. Some calculations that lead to NaN, other than , are attempting to take

The Wave Equation in R

The wave equation is a classic example of a partial differential equation. It comes in several variants and has applications beyond the name. In principle, the wave equation describes the path of a wave traveling through a medium. For a one-dimensional wave equation, this describes a wave traveling on a string, like a violin’s string. In two-dimensions, the wave equation describes a wave on a membrane, like a drumhead. And for three dimensions, it describes the propagation of sound through the air. The equation can also describe light waves. For our purposes, we will look at a one-dimensional light wave

CMNA v0.1.0 Released

Some of you know this, but just about a year now, I have been working on a book called Computational Methods for Numerical Analysis with R. This project, completed in my copious free time, was something of a dream project. Since I was an undergraduate mathematics major, where I found the standard texts on numerical analysis frustrating, I have planned to do this. After completing my dissertation, it was time. The biggest challenge to most introductory numerical analysis texts is the focus on theorems and rigorous proofs. Proofs and theorems are critical in mathematics, but numerical analysis is a little