Why does long%int in java sometimes round up? (not being converted to float/double)

后端 未结 0 1037
梦谈多话
梦谈多话 2021-01-17 09:15

I found an error in my code when trying to check if 31219483 is prime. Originally I had the line

a=int(Long.remainderUnsigned((long)a*a, n));

相关标签:
回答
  • 消灭零回复
提交回复
热议问题