add toDouble and compareTo
add toDouble and compareTo