     (clojure.core/double? x) x
     (clojure.core/integer? x) (double x)
     (string? x) (try
-                  (Double/valueOf x)
+                  (Double/valueOf (str x))
                   (catch Exception e
                     :clojure.spec/invalid))
     :else :clojure.spec/invalid))


(defn str-double->int
  "1. or 1.0...0 will convert to 1"
  [s]
  (some-> (re-find #"^([0-9]+)\.0*$" s)
          (last)
          (Integer/valueOf)))

(defn double->int

        (and (string? x)
             (str-double->int x)) (str-double->int x)
        (string? x) (try
                      (Integer/valueOf (str x))
                      (catch Exception e
                        :clojure.spec/invalid))
        :else :clojure.spec/invalid))
