InverseModI-Funktion
Warnung
Diese Dokumentation bezieht sich auf das klassische QDK, das durch das moderne QDK ersetzt wurde.
Weitere Informationen finden https://aka.ms/qdk.api Sie in der API-Dokumentation für das moderne QDK.
Namespace: Microsoft.Quantum.Math
Paket: Microsoft.Quantum.Standard
Gibt die multiplikative Inverse einer modularen ganzzahligen Zahl zurück.
function InverseModI (a : Int, modulus : Int) : Int
BESCHREIBUNG
Gibt $b$ zurück, sodass $a \cdot b = 1 (\operatorname{mod} \texttt{modulus})$.
Eingabe
a : Int
Die Zahl, die invertiert wird
modulus : Int
Der Modul, nach dem die Zahlen invertiert werden
Ausgabe : Int
Integer $b$ so, dass $a \cdot b = 1 (\operatorname{mod} \texttt{modulus})$.