Blog Archives

Three surprises with bc

bc is a quirky but useful calculator. It is a standard Unix utility and is also available for Windows. One nice feature of bc is that you can set the parameter scale to indicate the desired precision. For example, if

Tagged with: ,
Posted in Math

Math library functions that seem unnecessary

This post will give several examples of functions include in the standard C math library that seem unnecessary at first glance. Function log1p(x) = log(1 + x) The function log1p computes log(1 + x).  How hard could this be to

Tagged with: ,
Posted in Math, Software development

Stand-alone error function erf(x)

The question came up on StackOverflow this morning how to compute the error function erf(x) in Python. The standard answer for how to compute anything numerical in Python is “Look in SciPy.” However, this person didn’t want to take on

Tagged with: ,
Posted in Computing, Math, Python

The gamma function

The gamma function Γ(x) is the most important function not on a calculator. It comes up constantly in math. In some areas, such as probability and statistics, you will see the gamma function more often than other functions that are

Tagged with:
Posted in Math

Error function and the normal distribution

The error function erf(x) and the normal distribution Φ(x) are essentially the same function. The former is more common in math, the latter in statistics. I often have to convert between the two. It’s a simple exercise to move between erf(x)

Tagged with: , ,
Posted in Math, Statistics

Orthogonal polynomials

This morning I posted some notes on orthogonal polynomials and Gaussian quadrature. “Orthogonal” just means perpendicular. So how can two polynomials be perpendicular to each other? In geometry, two vectors are perpendicular if and only if their dot product of

Tagged with: , ,
Posted in Math

Chebyshev polynomials

I posted a four-page set of notes on Chebyshev polynomials on my web site this morning. These polynomials have many elegant properties that are simple to prove. They’re also useful in applications. Mr. Chebyshev may have the honor of the

Tagged with: ,
Posted in Math