I am porting some of my Python code to Matlab and have encountered an issue when doing mod calculations in Matlab, resulting in NaN being returned instead of the correct value like Python.
In Python the code is p = pow(8687205886,5788687615,8369428283)
the same in Matlab
a = 8687205886^5788687615
b = 8369428283
m = mod(a,b)
I have no acess to any toolboxes other than the default ones so using the Symbolic Maths Toolbox or alternatives are not an option.
How would such a calcuation be done in Matlab ?
Thank you