as.real to double