Seems to be failing in this case
MOD(0.3,0.1)

Just convert it as integer and do the calculation like this...
=MOD(0.3*10,0.1*10)

Your other examples are not clear for me since don't know which data belongs to which cell, so if possible attach a sample workbook with expected output for better understanding