software development and consulting

Since I moved my website to WordPress, I have been watching what search-engine searches land people on my page.

Sadly, two of the things that get people to my page most often still have not been moved over to the new site from the old. One of those things is a C++ template library for Clifford algebras. I am going to move that stuff over this week, I promise. But, I thought I might also make a Lisp library for Clifford algebras, too.

An example Clifford algebra might be . A generic element in this algebra is of the form:

where the are coefficients. For ease in dealing with these items, I will probably store that in a vector that looks something like this:

#( #() #() )

If you want a simple element though (where most of the coefficients are zero), you shouldn’t have to stare down all of that stuff or remember that comes before . I want you to be able to make more simply. Something like one of the following:

Some time ago, I wrote a small domain-specific language for finding polynomials given their value or the value of their derivatives at particular points.

It occurred to me shortly after writing that code that I could easily extend it to include the value of its integral over a certain range. I didn’t get to tackling that right away, and that was a Good Thing. In the intervening time, it occurred to me that I could extend it to moments as well.

So, are you looking for a polynomial that is zero at both zero and one, has a derivative of zero at one, has a second derivative of negative one at one, whose integral from zero to one is one, and whose mean (first moment centered at zero) on the interval zero to one is one fourth?

Often, I want to have a polynomial that meets certain criteria. For most applications in the past, I figured it all out by hand.

Today, I was having trouble getting the conditions specified enough to get the sort of polynomial that I was expecting. After finding the coefficients for several sixth degree polynomials in a row, I figured I should instead be able to do something like this with the proper lisp:

That’s all done now (polynomials.lisp). So, for the record, the above is: . That is still not quite the polynomial I want for this application, but it’s close. A few minutes of Lisp saved me hours of whiteboard work.