The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]

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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.