Modexp$(-81.875,1,35);$ will not work.
So what I have to do is the following:
Modexp$(-81,1,35); = 24$
$875/1000; = 7/8$
Modexp$(24*7,1,35); = 28$
Modexp$(8,-1,35); = 22$
Modexp$(22*28,1,35); = 21 \equiv −81.875 \mod 35$
But there has to be a more efficient way of calculuting $-\frac{655}{8}$ mod $35$. Does anyone know how that might be?
EDIT: Read comments below for correction.
In fact $8^{-1} = 22$. Then -81.875 $\equiv \frac{-665}{8} \equiv 10*22 \equiv 10$ mod 35. – Adam Staples Apr 21 '14 at 23:53