소스 검색

correction test dicreteLog

Olivier Marty 8 년 전
부모
커밋
b6c082e018
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      code/DiscreteLog_test.cpp

+ 2 - 1
code/DiscreteLog_test.cpp

@@ -14,7 +14,8 @@ int main() {
     int a = rand()%5000;
     int b = rand()%5000;
     int n = rand()%5000;
+    b %= n;
     int r = log_mod(a, b, n);
-    assert(r == -1 || pow_mod(a, r, n) == b%n);
+    assert(r == -1 || pow_mod(a, r, n) == b);
   }
 }