It may feel like it, but you can reduce any computer program to a mathematical expression.  Even that distinction feels a little silly and artificial, code almost just feels like a different kind of notation for math.  If you can patent code, you&#x27;re patenting math.<p>This may seem pedantic, but I really do think it gets to the core of why software patents have turned out to be such a disaster.  Math is specifically not patentable, and math coursework is specifically <i>excluded</i> from the scientific background required to become a member of the patent bar (the patent bar specifically identifies mathematics as coursework that does <i>not</i> qualify a person to sit for the patent bar).  People are often surprised by this, but if you have a BS, MS, and PhD in Math from MIT, you can&#x27;t sit from the patent bar (well, on the basis of that coursework anyway).<p>So what the patent system in the US has done is 1) allow math to be patented, and 2) specifically exclude people with math backgrounds from reviewing patents, 3) scratch head and puzzle about why trivial patents on mathematics are granted.