Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Unified Diff: sdk/lib/core/int.dart

Issue 1174513004: Implement modInverse (bigint version does not support even modulus yet). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_number.dart ('k') | tests/corelib/big_integer_arith_vm_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/int.dart
diff --git a/sdk/lib/core/int.dart b/sdk/lib/core/int.dart
index 1d29a728f0399e2c16059fa1bb0ec26b69d29c8b..f12c97c5edb158fdcc63f2a46f4e93780c5c7ead 100644
--- a/sdk/lib/core/int.dart
+++ b/sdk/lib/core/int.dart
@@ -111,6 +111,14 @@ abstract class int extends num {
*/
int modPow(int exponent, int modulus);
+ /**
+ * Returns the modular multiplicative inverse of this integer
+ * modulo [modulus].
+ *
+ * The [modulus] must be positive.
+ */
+ int modInverse(int modulus);
+
/** Returns true if and only if this integer is even. */
bool get isEven;
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_number.dart ('k') | tests/corelib/big_integer_arith_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698