Algorithms absolutely are patentable because they are computing "machines." It's mathematical equations that aren't patentable, because they're closer to laws of nature.