agentchat.contrib.captainagent.tools.math
agentchat.contrib.captainagent.tools.math.modular_inverse_sum
modular_inverse_sum
Calculates the sum of modular inverses of the given expressions modulo the specified modulus.
Arguments:
expressions
list - A list of numbers for which the modular inverses need to be calculated.modulus
int - The modulus value.
Returns:
int
- The sum of modular inverses modulo the specified modulus.