most of double is implemented