Medicine is fuzzy, software is mostly maths. You can prove your software has no bugs and you increasingly should be proving that. The hard part is knowing if what you prove is what the software is doing.
> You can prove your software has no bugs
That very much depends on got you define “bug” and how you specify your product requirements. Also, you have to assume the specs are correct.
The percentage of software that is even in theory provable to be bug free is a miniscule proportion of the software we use on a day to day basis. In many cases, simply the act of writing a proof becomes largely idempotent to building bug free software which is impractical.