Modulo division property

Can you write the code for finding the " b inverse " as mentioned in this video?

I think to find b inverse all you have to do is take it as (1/b) in the formula which can be written as-> (a/b)%m=((a%m)*((1/b)%m))%m. In this way, we prevent ourselves from encountering a case where (b%m) can become infinite, thus giving an infinite answer, hence being reason for not writing the formula as (a/b)%m=((a%m)/(b%m))%m.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.