Problems when 'mod' quite big number (like factorial).

조회 수: 2 (최근 30일)
Songbai Jin
Songbai Jin 2022년 5월 5일
댓글: Songbai Jin 2022년 5월 6일
mod(factorial(22),10000)
mod(factorial(23),10000)
The answers should both be 0. However, the answers are 0 and 2864 seperately.
How to solve this problem?
Thank you very much!

채택된 답변

David Hill
David Hill 2022년 5월 5일
편집: David Hill 2022년 5월 5일
x=sym('23');
mod(factorial(x),10000)
x=sym('24');
mod(factorial(x),10000)
  댓글 수: 1
Songbai Jin
Songbai Jin 2022년 5월 6일
Thanks for your answer. I'd really appreciate it if you could help with the other two similar questions I've asked.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by