         formatter.locale = NSLocale(localeIdentifier: "en_US")
         return formatter.numberFromString(self)?.doubleValue
     }
-}
-
+}
            brain.pushOperation(operation)
            displayValue=0
            
            historyValue = operation

        }
    }
    

            display.text = (userInMiddleOfTypingNumber ? display.text!+digit : digit)
            userInMiddleOfTypingNumber=true
            
            historyValue = (historyValue ?? "") + digit
        }
    }
    
    @IBAction func appendFloatingPoint() {
        if display.text!.rangeOfString(".")==nil{
            display.text=display.text!+"."
            historyValue = (historyValue ?? "") + "."
            userInMiddleOfTypingNumber=true
        }
    }
    
    @IBAction func undoDigit() {
        if var displayString = display.text, var historyString = historyValue{
            if(count(displayString)==1)
            {
                displayValue=0
