You're viewing version 1.2.0 of float?. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

float?

clojure.core

  • (float? n)
Returns true if n is a floating point number

1 Example top

  • user=> (float? 0)
    false
    user=> (float? 0.0)
    true
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:2767 top

(defn float?
  "Returns true if n is a floating point number"
  {:added "1.0"}
  [n]
  (or (instance? Double n)
      (instance? Float n)))
Vars in clojure.core/float?: defn instance? or

Comments top

No comments for float?. Log in to add a comment.