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!
0 个评论
采纳的回答
David Hill
2022-5-5
编辑:David Hill
2022-5-5
x=sym('23');
mod(factorial(x),10000)
x=sym('24');
mod(factorial(x),10000)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!