Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: wrong result when calculating modulus
Replies: 6   Last Post: May 17, 2013 6:18 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
ahmed

Posts: 2
Registered: 5/15/13
wrong result when calculating modulus
Posted: May 15, 2013 4:30 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi everyone,
i would be very grateful if some one can help me in calculating this result in matlab:

>> mod( (4^15)*(21^13) , 47)
ans = 21
which is not correct , it should be 3 , using the windows calculator gets the correct result ( e.g 3 ) but matlab not.

is there another way in matlab to calculate it ??
thanks in advance.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.