I'm using NSExpression for evaluating the following operation. But i'm getting NSInvalidArgumentException error for this. Please let me know how to evaluate the following operation.Thanks in Advance
let formula:NSString = "((y*4)⁄5)"
formula=formula.stringByReplacingOccurrencesOfString("y", withString: "8")
let expression = NSExpression(format: formula as String)
if let convertedValue = expression.expressionValueWithObject(nil, context: nil) as? NSNumber {
formula=NSNumber(float:convertedValue.floatValue).stringValue
}