Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is there any way to find $\lfloor xy\rfloor$ mod $m$ if $x$ is something large (like a big factorial where it is normal to calculate it stepwise, taking the modulus each step) and $y$ is irrational?

It does not appear that $\lfloor$(($x$ mod $m$) times $y$)$\rfloor$ mod $m$ is the same as $\lfloor$($x$ times $y$)$\rfloor$ mod $m$ even if it may work for integers.

share|improve this question
    
this might help, at least for a lack luster answer, think about x being $10^{10}$. Then the value of this would be $y$ to the first 10 decimal places. It really seems to depend on $x$ –  DanZimm May 9 '13 at 2:45

1 Answer 1

$\lfloor xy\rfloor \pmod{m}=\lfloor \left(x \pmod{\frac{m}{y}}\right)y\rfloor \pmod{m}$. You may subtract as many integer multiples of $\frac my$ as you want from $x$ without changing the final result.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.