Real Modulo Numbers in the Interval [0, 1), and Multiplication of

53 Views Asked by At

Let's say we have a real number, A, in the interval [0, 1). If we add another real number to it, it "Wraps" around back to zero.

So, for example:

Lets say: A = 5/13

If we multiply A by 2, we get: 10/13

If we multiple A by 3, we get: 2/13 (not 15/13)

If we multiple A by 4, we get 7/13 (not 20/13)

And so on...

My question is:

If given two such numbers, A and B, how can we find the smallest number, x, such that:

Ax = B

For example:

If A = 5/13 and B = 8/13, what do we need to multiply A by, to get B.

A solution for real numbers is preferable. However, if a solution does not exist for real numbers generally, then a solution for rational numbers should be sufficient.

Note that this problem is relevant to an algorithm that I'm writing. And I'd like to get it finished soon.

If I get my algorithm to work, and someone here provides a good solution, and that person (or people) have their name and contact details on their profile page, then I'm happy to give them a reference.