Refactored to account for float in evaluation of expression.