From a pure semantic point of view, the two codes have absolutely the same effect. The modulus is computed as a double-precision number. Whether it is temporarily stored in a double variable or not makes no difference. By the way, the optimizing compiler will most probably implement the first version like the second, recognizing that the temporary storage is useless.
Anyway, from a pragmatic point of view a difference could exist on the x86/x64 platform where the FPU registers are 80 bits rather than 64. In some optimization modes, the data is kept in those registers rather than copied back to memory with rounding. So the 80 bits computed value could be used straight from the FPU register for the next computations.
Anyway, it is unlikely that in this circumstance, using a temporary will force rounding to 64 bits. In any case, the second form could only be more accurate.