Talk:Modular inverse

From Rosetta Code
Revision as of 16:45, 14 November 2013 by rosettacode>Paddy3118 (→‎Handle a < 0 ?: Seems OK?)

Handle a < 0 ?

The problem is perfectly well defined for a < 0, but many of the implementations (e.g. the C version and translations thereof) do not handle this case correctly. Is this a bug in the implementations or in the problem specification.

— Steven G. Johnson (talk) 16:38, 14 November 2013 (UTC)

It seems to be neither Steven. You don't have to consider a < 0 to answer the example given in the task description. --Paddy3118 (talk) 16:45, 14 November 2013 (UTC)