How to calculate a Mod b in Casio fx-991ES calculator
Asked Answered
D

11

116

Does anyone know how to calculate a Mod b in Casio fx-991ES Calculator. Thanks

Dimity answered 7/12, 2011 at 17:45 Comment(7)
You should really use the Google machine. Look here: thestudentroom.co.uk/showthread.php?t=38469Circumfuse
+1 for asking a casio calculator related question.Harewood
This question appears to be off-topic because it is not about programmingWrote
@Wrote shouldn't we move it to math.stackexchange then?Footsore
I found this youtube video and this could be useful. youtube.com/watch?v=pzCOUQMSr8ECoca
I'm voting to close this question as off-topic because it is not about programming as defined by the help center.Liaison
@Wrote nice to see you here. my delphi friend.Biddable
O
165

This calculator does not have any modulo function. However there is quite simple way how to compute modulo using display mode ab/c (instead of traditional d/c).

How to switch display mode to ab/c:

  • Go to settings (Shift + Mode).
  • Press arrow down (to view more settings).
  • Select ab/c (number 1).

Now do your calculation (in comp mode), like 50 / 3 and you will see 16 2/3, thus, mod is 2. Or try 54 / 7 which is 7 5/7 (mod is 5). If you don't see any fraction then the mod is 0 like 50 / 5 = 10 (mod is 0).

The remainder fraction is shown in reduced form, so 60 / 8 will result in 7 1/2. Remainder is 1/2 which is 4/8 so mod is 4.

EDIT: As @lawal correctly pointed out, this method is a little bit tricky for negative numbers because the sign of the result would be negative.

For example -121 / 26 = -4 17/26, thus, mod is -17 which is +9 in mod 26. Alternatively you can add the modulo base to the computation for negative numbers: -121 / 26 + 26 = 21 9/26 (mod is 9).

EDIT2: As @simpatico pointed out, this method will not work for numbers that are out of calculator's precision. If you want to compute say 200^5 mod 391 then some tricks from algebra are needed. For example, using rule (A * B) mod C = ((A mod C) * B) mod C we can write:

200^5 mod 391 = (200^3 * 200^2) mod 391 = ((200^3 mod 391) * 200^2) mod 391 = 98

Orthodoxy answered 13/1, 2012 at 23:28 Comment(9)
@simpatico because 200^5 is out of range of calc's precision you need to use some tricks from algebra. For example: 200^5 mod 391 = (200^3 mod 391) * 200^2 mod 391 = 98 (you can use mod at 'any time' during computation).Orthodoxy
This result will be inaccurate for negative numbers. For example: -121 mod 26 = 9 because -121 = -5*26 + 9. But 121 mod 26 = 17 because 121 = 4*26+17.Finding
What about in case of decimal numbers. Like -1/2 mod 23? William Stalling (Network Security and Cryptography) says its 11 but I don't understand how.Sharyl
@Sharyl I guess it depends on your definition of modulo operation. I can imagine very simple extension of modulo operation to real numbers that is defined in the similar fashion as reminder after integer division. In that case 3.14159 mod 1.4 would be 0.34159 (3.14159 = 2 * 1.4 + 0.34159). In the same way you can say that if reminder is negative you would turn it to positive so your example -0.5 mod 23 would be 22.5 in my book. But again, some applications might define modulo in different way.Orthodoxy
@Orthodoxy Its the computer science modulus division where the remainder is the answer. I also believed 22.5 to be the answer bu apparently 11 is the correct answer.Sharyl
@Finding You are right but it is trivial to find any positive integer y that is congruent to some negative integer x (mod n). Also, any mod function will correctly process a negative value.Footsore
Also, the denominator must be the same as the original fraction, else the value in the numerator won't be the correct modulo.Parsonage
as @Parsonage correctly pointed out, the resulting denominator should be equal. Take f.e. 288 mod 21; the result will be displayed as 13 5/7. As you can see, the denominator is different from 21; so, you have to multiply the numerator by 21/7 = 3. The answer is then 5 x 3 = 15.Cosignatory
Wrong, this calculator has already modulo function: Alpha + fractionOsmanli
B
54

As far as I know, that calculator does not offer mod functions. You can however computer it by hand in a fairly straightforward manner. Ex.

(1)50 mod 3

(2)50/3 = 16.66666667

(3)16.66666667 - 16 = 0.66666667

(4)0.66666667 * 3 = 2

Therefore 50 mod 3 = 2

Things to Note: On line 3, we got the "minus 16" by looking at the result from line (2) and ignoring everything after the decimal. The 3 in line (4) is the same 3 from line (1).

Hope that Helped.

Edit As a result of some trials you may get x.99991 which you will then round up to the number x+1.

Brotherly answered 10/12, 2011 at 12:57 Comment(5)
And how do I convert decimal to binary conversations by calculator if I don't have the bases mechanism in my calculator?Libertinage
Can I find the modulus of a negative by following the above steps ? For Example -151 mod 26Urbain
@Libertinage this is a separate question/problem, try asking a question of your own (if it doesn't already exist). But the easiest method I find is to convert it to hexadecimal which then converts to binary instantly (i.e. Dec 10 = Hex A = Binary 1010). There are relatively simple methodologies to go between even very very big (or very very small!) exponential decimal values to hex, google 'em. I had to use them in one of my first year CS exam questions. If you ever need to check the binary of anything, always work in hex rather than decimal anyway.Footsore
@RohitKiran If you add (rather than subtract) n multiples of 26 to -151 until you get a positive value x s.t. 0 ≤ x < 26, then you will see that -151 ≡ x (mod 26). Or, to put it another way, just use -26 instead and then follow from step (2). Which, by the way, is too slow and therefore impractical. But it's still worth knowing.Footsore
But in this case, if a fractional value is very large then iun result it will be round off and you could not get correct resultHickey
L
27

You need 10 ÷R 3 = 1 This will display both the reminder and the quoitent


÷R

enter image description here

Lithea answered 27/10, 2016 at 14:36 Comment(6)
Which model is that exactly? On mine Casio fx-991ES PLUS there's no this R button:(Topaz
Just be careful, while the displayed remainder is correct for a single division, in larger expressions the operator will NOT act as a modulo operator. From the manual: If a ÷R calculation is part of a multi-step calculation, only the quotient is passed on to the next operation. eg. (2÷R3 + 3÷R3) = 1, however (2mod3 + 3mod3) = 2Reimers
I think this is Casio fx-115ES PLUS.Pup
thanks, it works perfect, you should be higher. I have a fx-991sp x II and it works perfect. Just what i was looking for.Fabien
Other calculators might still have this button in a different location; I have the fx-300es plus and it is [shift]+[Abs] for me instead of [alpha]+[fraction] button shown hereCorneous
perfect on fx-375esMete
C
15

There is a switch a^b/c

If you want to calculate

491 mod 12

then enter 491 press a^b/c then enter 12. Then you will get 40, 11, 12. Here the middle one will be the answer that is 11.

Similarly if you want to calculate 41 mod 12 then find 41 a^b/c 12. You will get 3, 5, 12 and the answer is 5 (the middle one). The mod is always the middle value.

Claribelclarice answered 27/5, 2013 at 6:28 Comment(6)
why its not useful? its not the straight method.. but we can find te answerClaribelclarice
I did not downvote, but your answer uses exactly the same methodology as the top voted one (and you wrote it 4 months later). Also, it is very badly explained.Fishman
@Jerry Actually, some calculators (Casio) have a straight a^b/c button and don't even have any of the functionality corresponding to the top answer, which I assume is for TI calculators. I have been scouring the internet for a straightforward explanation of how to use a^b/c to calculate remainders of integer division on my Casio fx-9750GA PLUS and this was incredibly straightforward after Ajoy's edit.Footsore
I should note however, that even though this saves time, it is still incompatible with large values (i.e. 10 digits +)Footsore
45 a^b/c 6 gives middle value 1. whereas the actual modulus is 3 how come ?Gaskin
This is only true if a mod b gives output d^e/b, otherwise, some multiplications will be needed.Breathtaking
C
11

You can calculate A mod B (for positive numbers) using this:

Pol( -Rec( 1/r , 2πr × A/B ) , Y ) ( πr - Y ) B

Then press [CALC], and enter your values for A and B, and any value for Y.

/ indicates using the fraction key, and r means radians ( [SHIFT] [Ans] [2] )

Causeuse answered 28/1, 2013 at 22:17 Comment(2)
Function's too complex I can't even type it correctly! Anyway what's that superscripted minus thing between Pol and Rec??Plea
oh it's just a minus! Why the superscript??Plea
A
5

Here's how I usually do it. For example, to calculate 1717 mod 2:

  • Take 1717 / 2. The answer is 858.5
  • Now take 858 and multiply it by the mod (2) to get 1716
  • Finally, subtract the original number (1717) minus the number you got from the previous step (1716) -- 1717-1716=1.

So 1717 mod 2 is 1.

To sum this up all you have to do is multiply the numbers before the decimal point with the mod then subtract it from the original number.

Arcuation answered 6/6, 2014 at 12:11 Comment(0)
T
5

type normal division first and then type shift + S->d

Three answered 20/6, 2015 at 16:12 Comment(1)
Works similar to the top answer, Thanks!Ferrosilicon
M
4

mod formula Note: Math error means a mod m = 0

Morion answered 7/11, 2016 at 21:26 Comment(0)
E
3

It all falls back to the definition of modulus: It is the remainder, for example, 7 mod 3 = 1. This because 7 = 3(2) + 1, in which 1 is the remainder.

To do this process on a simple calculator do the following: Take the dividend (7) and divide by the divisor (3), note the answer and discard all the decimals -> example 7/3 = 2.3333333, only worry about the 2. Now multiply this number by the divisor (3) and subtract the resulting number from the original dividend.

so 2*3 = 6, and 7 - 6 = 1, thus 1 is 7mod3

Efren answered 17/10, 2014 at 17:55 Comment(1)
You method is correct and obvious, but impractical for most conditions where you would even need a calculator in the first place. In an exam for discrete math say, if you are trying to figure out congruence of very very large exponents then this method is directly impossible, and indirectly much too slow – you usually have to do a bit of RSA encrypt/decrypt in the exam by hand and without a built-in mod functionality it takes up too much time. Even our lecturers tell us this. Not a criticism of your answer, just worth pointing out it's practical limitation.Footsore
E
2

Calculate x/y (your actual numbers here), and press a b/c key, which is 3rd one below Shift key.

Elana answered 11/1, 2015 at 7:23 Comment(0)
P
2

Simply just divide the numbers, it gives yuh the decimal format and even the numerical format. using S<->D

For example: 11/3 gives you 3.666667 and 3 2/3 (Swap using S<->D). Here the '2' from 2/3 is your mod value.

Similarly 18/6 gives you 14.833333 and 14 5/6 (Swap using S<->D). Here the '5' from 5/6 is your mod value.

Precursory answered 6/1, 2021 at 4:32 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.