>From Diamond v. Diehr 450 U. S. 175

"We recognize, of course, that when a claim recites a mathematical
formula (or scientific principle or phenomenon of nature), an inquiry
must be made into whether the claim is seeking patent protection for
that formula in the abstract.  A mathematical formula as such is not
accorded the protection of our patent laws [cites Gottschalk v.
Benson] and this prnciple cannot be circumvented by attempting to
limit the use of the formula to a particular technological environment
[cites Parker v. Flook] Similarly, insignificant post-solution
activity will not transform an unpatentable principle into a
patentable process.  To hold otherwise would allow a competent
draftsman to evade the recognized limitations on the type of subject
matter eligible for patent protection.

On the other hand, when a claim containing a mathematical formula
implements or applies that formula in a structure or process which,
when considered as a whole, is performing a function which the patent
laws were designed to protect (e.g., transforming or reducing an
article to a different state or thing), then the claims satisifes the
requirements of Section 101. "
