big numbers in matlab / sym math tool
이전 댓글 표시
I have a problem using very big numbers in matlab. For example, i want to calculate 26^29.
Without Sym Math Tool i get 1.081999577417210e+41, or with Sym Maths Tool 108199957741720993031339765987128356372480. If i try to find its value in modulus 35, i get mod(26^29,35)=20.
When i use wolframalpha, i get 108199957741720996894562347292921981566976, and the modulus value 31, which is correct!
In matlab, if i subtract the wolfram's correct value from 26^29, the result is 0!
I am doing this as a simulation of Euler's totient theorem, and i banged my head around it for a while until it became obvious that there is an error in matlab.
Is there any way to bypass this error, and what can be the source of it?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Elementary Math에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!