 
     fileprivate func readDigit(_ hasDot: inout Bool) -> UnicodeScalar? {
         if let ch = readNext() {
-            if (ch >= "0" && ch <= "9") {
+            if ((ch >= "0" && ch <= "9") || ch == "e" || (previous == "e" && ch == "-") ) {
                 return ch
             } else if (ch == "." && !hasDot) {
                 hasDot = true

    }

    private func readNext() -> UnicodeScalar? {
        current = iterator.next()
        return current
    }

    
    private let input: String
    private var current: UnicodeScalar?
    private var previous: UnicodeScalar?
    private var iterator: String.UnicodeScalarView.Iterator

    init(input: String) {
