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

1 次查看(过去 30 天)
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