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

Unified Diff: runtime/lib/bigint.dart

Issue 1205363003: Add tests for gcd, modInverse and modPow that also run on dart2js. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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 | « no previous file | tests/corelib/corelib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/bigint.dart
diff --git a/runtime/lib/bigint.dart b/runtime/lib/bigint.dart
index adfb0db4cca73f924008dec248d1c07a09a464d5..a6c5f76e349b73e5384d4e3dbb229f3b03e38e8a 100644
--- a/runtime/lib/bigint.dart
+++ b/runtime/lib/bigint.dart
@@ -1562,7 +1562,7 @@ class _Bigint extends _IntegerImplementation implements int {
if (((x_used == 1) && (x_digits[0] == 1)) ||
((y_used == 1) && (y_digits[0] == 1))) return 1;
bool xy_cloned = false;
- while (x.isEven && y.isEven) {
+ while (x_digits[0].isEven && y_digits[0].isEven) {
regis 2015/06/25 17:03:13 Thanks You could even write ((x_digits[0] & 1) ==
Lasse Reichstein Nielsen 2015/06/26 08:40:40 Done. Would it make sense to count the leading ze
_rsh(x_digits, x_used, 1, x_digits);
_rsh(y_digits, y_used, 1, y_digits);
s++;
« no previous file with comments | « no previous file | tests/corelib/corelib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698