Hello Soroban,
if you multiply a fraction in "decimal" notation by the base you move the "decimal" point one digit to the right. (It's a more general rule to the SHR-command in assembler).
If you multiply F_2 by A then the digits after the "decimal" point are the same as at F_1. If you subtract F_1 from A*F_2 then you get an integer. If you multiply F_1 by A then the digits after the "decimal" point are the same as at F_2. If you subtract F_2 from A*F_1 then you get an integer.
This method will give 4 linear equations:
I've got: A = 11, B= 8, F_1=1/3, F_3=2/3 (this time base 10)
EB
PS: As usual CaptainBlack is much faster than I
Hello, Captain Black and earboth!
I thought my book had a clever solution.
. . But yours are much shorter and more elegant.
I still want to show everyone the book's solution.
. . It has an interesting (unexpected) approach.
. . Hence: . [1]
Similarly: . [2]
Add [1] and [2]: .
. .
. . [3]
Subtract [1] from [2]: .
. .
. . [4]
[3] and [4] give us a system of equations: .
. . with solutions: .
Then: .
I agree . . . This solution is much longer.
But there are some interesting techniques involved
. . which I've added to my arsenal.