Use floatval instead of casting