1.3.0 permalink Arrow_down_16x16

float

clojure.core

  • (float x)
Coerce to float

1 Example top

  • user=> (float 1)
    1.0
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:3072 top

(defn float
  "Coerce to float"
  {:inline (fn  [x] `(. clojure.lang.RT (~(if *unchecked-math* 'uncheckedFloatCast 'floatCast) ~x)))
   :added "1.0"}
  [^Number x] (clojure.lang.RT/floatCast x))
Vars in clojure.core/float:
Used in 0 other vars

Comments top

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