Even patenting a formula's application is becoming more restricted. In Australia and the US, the two relevant tests seem to be whether the formula does something a human can't, and whether the formula is used to 'improve' the operations of a computer or machine (e.g. if it made your hard drive faster or controlled a robotic arm).
I had to look into this regarding an algorithm we're building and whether it's patentable. If your formula is a mere scheme or method implemented in a computer, it's likely to be rejected. The following links add detail: