fixed amount type in fromFloat()