 
   (is (== 42.2e3M (read-string "42.2e3M")))
   (is (== +42.2e+3M (read-string "+42.2e+3M")))
-  (is (== -42.2e-3M (read-string "-42.2e-3M"))))
+  (is (== -42.2e-3M (read-string "-42.2e-3M")))
+
+  (is (instance? Double (read-string "+1.0e+1")))
+  (is (instance? Double (read-string "+1.e+1")))
+  (is (instance? Double (read-string "+1e+1")))
+
+  (is (instance? Double (read-string "+1.0e+1")))
+  (is (instance? Double (read-string "+1.e+1")))
+  (is (instance? Double (read-string "+1e+1")))
+
+  (is (instance? Double (read-string "+1.0e1")))
+  (is (instance? Double (read-string "+1.e1")))
+  (is (instance? Double (read-string "+1e1")))
+
+  (is (instance? Double (read-string "+1.0e-1")))
+  (is (instance? Double (read-string "+1.e-1")))
+  (is (instance? Double (read-string "+1e-1")))
+
+  (is (instance? Double (read-string "1.0e+1")))
+  (is (instance? Double (read-string "1.e+1")))
+  (is (instance? Double (read-string "1e+1")))
+
+  (is (instance? Double (read-string "1.0e-1")))
+  (is (instance? Double (read-string "1.e-1")))
+  (is (instance? Double (read-string "1e-1")))
+
+  (is (instance? Double (read-string "-1.0e+1")))
+  (is (instance? Double (read-string "-1.e+1")))
+  (is (instance? Double (read-string "-1e+1")))
+
+  (is (instance? Double (read-string "-1.0e1")))
+  (is (instance? Double (read-string "-1.e1")))
+  (is (instance? Double (read-string "-1e1")))
+
+  (is (instance? Double (read-string "-1.0e-1")))
+  (is (instance? Double (read-string "-1.e-1")))
+  (is (instance? Double (read-string "-1e-1")))
+
+  (is (instance? Double (read-string "+1.0")))
+  (is (instance? Double (read-string "+1.")))
+
+  (is (instance? Double (read-string "1.0")))
+  (is (instance? Double (read-string "1.")))
+
+  (is (instance? Double (read-string "+0.0")))
+  (is (instance? Double (read-string "+0.")))
+
+  (is (instance? Double (read-string "0.0")))
+  (is (instance? Double (read-string "0.")))
+
+  (is (instance? Double (read-string "-0.0")))
+  (is (instance? Double (read-string "-0.")))
+
+  (is (instance? Double (read-string "-1.0")))
+  (is (instance? Double (read-string "-1.")))
+
+  (is (instance? BigDecimal (read-string "9223372036854775808M")))
+  (is (instance? BigDecimal (read-string "-9223372036854775809M")))
+  (is (instance? BigDecimal (read-string "2147483647M")))
+  (is (instance? BigDecimal (read-string "+1M")))
+  (is (instance? BigDecimal (read-string "1M")))
+  (is (instance? BigDecimal (read-string "+0M")))
+  (is (instance? BigDecimal (read-string "0M")))
+  (is (instance? BigDecimal (read-string "-0M")))
+  (is (instance? BigDecimal (read-string "-1M")))
+  (is (instance? BigDecimal (read-string "-2147483648M")))
+
+  (is (instance? BigDecimal (read-string "+1.0e+1M")))
+  (is (instance? BigDecimal (read-string "+1.e+1M")))
+  (is (instance? BigDecimal (read-string "+1e+1M")))
+
+  (is (instance? BigDecimal (read-string "+1.0e1M")))
+  (is (instance? BigDecimal (read-string "+1.e1M")))
+  (is (instance? BigDecimal (read-string "+1e1M")))
+
+  (is (instance? BigDecimal (read-string "+1.0e-1M")))
+  (is (instance? BigDecimal (read-string "+1.e-1M")))
+  (is (instance? BigDecimal (read-string "+1e-1M")))
+
+  (is (instance? BigDecimal (read-string "1.0e+1M")))
+  (is (instance? BigDecimal (read-string "1.e+1M")))
+  (is (instance? BigDecimal (read-string "1e+1M")))
+
+  (is (instance? BigDecimal (read-string "1.0e1M")))
+  (is (instance? BigDecimal (read-string "1.e1M")))
+  (is (instance? BigDecimal (read-string "1e1M")))
+
+  (is (instance? BigDecimal (read-string "1.0e-1M")))
+  (is (instance? BigDecimal (read-string "1.e-1M")))
+  (is (instance? BigDecimal (read-string "1e-1M")))
+
+  (is (instance? BigDecimal (read-string "-1.0e+1M")))
+  (is (instance? BigDecimal (read-string "-1.e+1M")))
+  (is (instance? BigDecimal (read-string "-1e+1M")))
+
+  (is (instance? BigDecimal (read-string "-1.0e1M")))
+  (is (instance? BigDecimal (read-string "-1.e1M")))
+  (is (instance? BigDecimal (read-string "-1e1M")))
+
+  (is (instance? BigDecimal (read-string "-1.0e-1M")))
+  (is (instance? BigDecimal (read-string "-1.e-1M")))
+  (is (instance? BigDecimal (read-string "-1e-1M")))
+
+  (is (instance? BigDecimal (read-string "+1.0M")))
+  (is (instance? BigDecimal (read-string "+1.M")))
+
+  (is (instance? BigDecimal (read-string "1.0M")))
+  (is (instance? BigDecimal (read-string "1.M")))
+
+  (is (instance? BigDecimal (read-string "+0.0M")))
+  (is (instance? BigDecimal (read-string "+0.M")))
+
+  (is (instance? BigDecimal (read-string "0.0M")))
+  (is (instance? BigDecimal (read-string "0.M")))
+
+  (is (instance? BigDecimal (read-string "-0.0M")))
+  (is (instance? BigDecimal (read-string "-0.M")))
+
+  (is (instance? BigDecimal (read-string "-1.0M")))
+  (is (instance? BigDecimal (read-string "-1.M"))))
 
 (deftest read-ratio
   (is (== 4/2 (read-string "4/2")))


(deftest read-eval
  (is (= 3 (read-string "#=(+ 1 2)"))))


  (is (== 0x42e (read-string "0x42e")))
  (is (== +0x42e (read-string "+0x42e")))
  (is (== -0x42e (read-string "-0x42e")))

  (is (instance? Long (read-string "2147483647")))
  (is (instance? Long (read-string "+1")))
  (is (instance? Long (read-string "1")))
  (is (instance? Long (read-string "+0")))
  (is (instance? Long (read-string "0")))
  (is (instance? Long (read-string "-0")))
  (is (instance? Long (read-string "-1")))
  (is (instance? Long (read-string "-2147483648")))

  (is (instance? Long (read-string "2147483648")))
  (is (instance? Long (read-string "-2147483649")))
  (is (instance? Long (read-string "9223372036854775807")))
  (is (instance? Long (read-string "-9223372036854775808")))

  (is (instance? BigInt (read-string "9223372036854775808")))
  (is (instance? BigInt (read-string "-9223372036854775809")))
  (is (instance? BigInt (read-string "10000000000000000000000000000000000000000000000000")))
  (is (instance? BigInt (read-string "-10000000000000000000000000000000000000000000000000"))))

(deftest read-floating
  (is (== 42.23 (read-string "42.23")))
