Fix bug: Use double and DoubleWritable instead of int for modularity
difference

Signed-off-by: Tzu-Li Tai <tzulitai@ee.ncku.edu.tw>