 
     @_displayOutput stack.peek()
 
+  _clearInput: ->
+    @input.clear()
+    @_displayInput()
+
   # Computes an unary operation using the given operator function.
   #
   # @param [Function] func  the given operator function

    $target = $(event.currentTarget)

    code = $target.data 'code'
    switch code
      when 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
        @_enterDigit code
      when '.'
        @_enterPoint()
      when '+/-'
        @_toggleSign()
      when 'DEL'
        @_deleteLastChar()
      when 'AC'
        @_allClear()
      when '+'
        @_calcPlusMinus true
      when '-'
        @_calcPlusMinus false
      when '*'
        @_calcMultDiv true
      when '/'
        @_calcMultDiv false
      when '%'
        @_calcUnaryOp (x1) -> x1 / 100
      when 'x^2'
        @_calcUnaryOp (x1) -> x1 * x1
      when 'sqrt'
        @_calcUnaryOp (x1) -> Math.sqrt x1
      when '1/x'
        @_calcUnaryOp (x1) -> 1 / x1
      when '='
        @_calcResult()

    false


  #
  _allClear: ->
    @stack.clear()
    @opStack.clear()
    @input.clear()
    @error = false
    @_displayInput()

  # Calculates the given base operation (plus, minus, times, divided by).  The
