implicit casts to double may be ambigous and my cause unnecessary
overhead, avoid that by providing a toDouble() functions