Math 如何计算表达式

Math 如何计算表达式,math,modular-arithmetic,Math,Modular Arithmetic,给定方程->(指数+旋转)%rot=f;如果我知道f,旋转,旋转的值 什么是计算指数的公式。我的数学不是很好,但我想知道如何在我的编程中计算指数 (索引+旋转)%rot=f 意味着 所以 index = rot*k + f - rotation, k: integer 如果希望索引为0,请确保选择k>(rotation-f)/rotrot*k+f-rotation,这里k是一个非零整数。 index = rot*k + f - rotation, k: integer

给定方程->(指数+旋转)%rot=f;如果我知道f,旋转,旋转的值 什么是计算指数的公式。我的数学不是很好,但我想知道如何在我的编程中计算指数

(索引+旋转)%rot=f

意味着

所以

index = rot*k + f - rotation, k: integer

如果希望索引为0,请确保选择
k>(rotation-f)/rot
rot*k+f-rotation
,这里k是一个非零整数。
index = rot*k + f - rotation, k: integer