I dunno how software patents work but I was under the impression that unless you basically copy paste their code, the courts wouldn't consider it patent infringement as you can't patent the function, but rather the specific thing itself which for software is the exact code itself. But if I'm not understanding something please correct me.
You’re thinking of copyright, which covers a specific creative expression. Patents are more general on how something is done and would cover different code that works the same way.
Software patents are magic, you just start your process with 'on a computer do X' and because computers are a piece of hardware you can patent anything you like
I'm still upset that my "you can't patent software because of the Curry-Howard isomorphism" legal argument never took off. (Basically, software is equivalent to math, and you can't patent math. Therefore, you can't patent software. QED.)