Hello,
I believe that this is related to the following issue: #121. That issue is fixed and working on v1.2.5, but using the EltwiseFMAMod function to scale numbers when the modulus is 52 bits (a number between 2^51 and 2^52) sometimes fails. Could you confirm this behaviour?
Example case:
modulus = 4503599627370486
input = {1191078607011827, 1769260550218270, 4345204646426905, 1153813479460416, 2994576917176123, 2254124429352543, 2866174865142532, 3780255914740878}
factor = 3724197286470134
input_mod_factor = 1
function call:
intel::hexl::EltwiseFMAMod(result, input, factor, nullptr, input.size(), modulus, input_mod_factor);
Result:
{3669213812048074, 4438596699595472, 3062713067630738, 2441777770654938, 1332695674286306, 833480206939968, 2031613570657280, 229641522601742}
Expected (input * factor):
{3669213812048074, 4438596699595472, 3062713067630738, 2441777770654938, 1332695674286306, 833480206939968, 2031613570657280, 229641522601752}
Note the last element is not correct.