Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
Songbai Jin
Songbai Jin el 5 de Mayo de 2022
Comentada: Songbai Jin el 6 de Mayo de 2022
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!

Respuesta aceptada

David Hill
David Hill el 5 de Mayo de 2022
Editada: David Hill el 5 de Mayo de 2022
x=sym('23');
mod(factorial(x),10000)
x=sym('24');
mod(factorial(x),10000)
  1 comentario
Songbai Jin
Songbai Jin el 6 de Mayo de 2022
Thanks for your answer. I'd really appreciate it if you could help with the other two similar questions I've asked.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by