Better/more overflow check.
better error message.
small code cleanup.
cleanup
test, change the range value to be able to use a lower eps.
update comment
new sparse opt. that remove dense_from_sparse(sparse_from_dense(x)) -> x