Minor optimization to ensureDouble().