Difference between revisions of "Manuals/calci/MOD"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
*<math>n</math> is any real number and <math>d</math>is the divisor | *<math>n</math> is any real number and <math>d</math>is the divisor | ||
− | == | + | ==Description== |
*This function gives the remainder of the number after dividing with some number. | *This function gives the remainder of the number after dividing with some number. | ||
− | *When we divide two integers we will get the result like this: X/Y= Q with remainder R. Here X is the dividend, Y is the divisor, Q is the Quotient and R is the remainder.So MOD(n,d)=R. | + | *When we divide two integers we will get the result like this: X/Y= Q with remainder <math>R</math>. Here <math> X </math> is the dividend, <math>Y</math> is the divisor, <math>Q</math> is the Quotient and <math> R</math> is the remainder.So <math> MOD(n,d)=R</math>. |
*For e.g., MOD(5,2)=1. Here 1 is the remainder. | *For e.g., MOD(5,2)=1. Here 1 is the remainder. | ||
− | *The MOD function we can write using INT function: MOD(n,d)=n-d*INT(n/d). | + | *The <math>MOD</math> function we can write using <math>INT</math> function: <math> MOD(n,d)=n-d*INT(n/d)</math>. |
*This function will return the result as error when the d value is 0. | *This function will return the result as error when the d value is 0. | ||
*Suppose the value of n and d with same sign either '+' or '-',then the result also with same sign. | *Suppose the value of n and d with same sign either '+' or '-',then the result also with same sign. | ||
− | *But n and d are with different then the result will come with the d sign only. | + | *But <math> n</math> and <math> d </math>are with different then the result will come with the <math> d </math> sign only. |
Line 18: | Line 18: | ||
#MOD(12,-4)=0 | #MOD(12,-4)=0 | ||
#MOD(85,-9)=-5 | #MOD(85,-9)=-5 | ||
− | MOD(-52,7)=4 | + | #MOD(-52,7)=4 |
− | MOD(0,9)=0 | + | #MOD(0,9)=0 |
− | MOD(9,0)=NAN | + | #MOD(9,0)=NAN |
− | MOD(5.5,2)=1.5 | + | #MOD(5.5,2)=1.5 |
− | |||
− | |||
− | |||
− | |||
− | + | ==See Also== | |
+ | *[[Manuals/calci/INT | INT ]] | ||
+ | *[[Manuals/calci/ROUND | ROUND ]] | ||
− | + | ==References== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 21:31, 25 December 2013
MOD(n,d)
- is any real number and is the divisor
Description
- This function gives the remainder of the number after dividing with some number.
- When we divide two integers we will get the result like this: X/Y= Q with remainder . Here is the dividend, is the divisor, is the Quotient and is the remainder.So .
- For e.g., MOD(5,2)=1. Here 1 is the remainder.
- The function we can write using function: .
- This function will return the result as error when the d value is 0.
- Suppose the value of n and d with same sign either '+' or '-',then the result also with same sign.
- But and are with different then the result will come with the sign only.
Examples
- MOD(5,2)=1
- MOD(-11,-3)-2
- MOD(25,5)=0
- MOD(12,-4)=0
- MOD(85,-9)=-5
- MOD(-52,7)=4
- MOD(0,9)=0
- MOD(9,0)=NAN
- MOD(5.5,2)=1.5