Ultimately software is math. Patenting math makes as much sense as patenting rhetorical devices in English.