[HW4] n의 오버플로우 처리에 관한 질문 #867
-
이름 Your Name하승종 Question
먼저, 과제의 keygen의 입력 범위는 1 ~ 2^32 입니다. 그리고 스켈레톤 코드에서 제시하는 n의 타입은 number이고 이는 ocaml int로 64비트 운영체제 기준 2^62 -1 까지 표현할 수 있습니다. 따라서 n = p *q 에서 오버플로우가 발생할 수 있고, 이를 어떻게 처리해야 하는지 궁금합니다
In the provided skeleton code, the type of n is number, which corresponds to OCaml's int. On a 64-bit system, this can represent values up to 2⁶² − 1. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
설명을 다음과 같이 정정하겠습니다.
따라서 p*q에서 오버플로우가 발생하는 일은 없다고 생각해주시면 되겠습니다. Let's revise the description as follows
Thus, overflow never happens with p*q. |
Beta Was this translation helpful? Give feedback.
설명을 다음과 같이 정정하겠습니다.
따라서 p*q에서 오버플로우가 발생하는 일은 없다고 생각해주시면 되겠습니다.
Let's revise the description as follows
Thus, overflow never happens with p*q.