@@ -0,0 +1,1066 @@
+package com.yuzhouwan.hacker.algorithms;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A/**%0A * Copyright @ 2018 yuzhouwan.com%0A * All right reserved.%0A * Function%EF%BC%9ADouble Test%0A *%0A * @author Benedict Jin%0A * @since 2018/6/27%0A */%0Apublic class DoubleTest %7B%0A%0A    @Test%0A    public void count2One() %7B%0A        double d = 0;%0A        d += 0.1;%0A        assertEquals(%220.1%22, String.valueOf(d));%0A        d += 0.1;%0A        assertEquals(%220.2%22, String.valueOf(d));%0A        d += 0.1;%0A        assertEquals(%220.30000000000000004%22, String.valueOf(d));%0A        d += 0.1;%0A        assertEquals(%220.4%22, String.valueOf(d));%0A        d += 0.1;%0A        assertEquals(%220.5%22, String.valueOf(d));%0A        d += 0.1;%0A        assertEquals(%220.6%22, String.valueOf(d));%0A        d += 0.1;%0A        assertEquals(%220.7%22, String.valueOf(d));%0A        d += 0.1;%0A        assertEquals(%220.7999999999999999%22, String.valueOf(d));%0A        d += 0.1;%0A        assertEquals(%220.8999999999999999%22, String.valueOf(d));%0A        d += 0.1;%0A        assertEquals(%220.9999999999999999%22, String.valueOf(d));%0A    %7D%0A%7D%0A

Add testcase for 0.30000000000000004