2
submitted 6 months ago by planet@clj.social to c/clojure@lemmy.ml

Proper way to compare numbers in Clojure

https://clojure-diary.gitlab.io/2024/05/22/proper-way-to-compare-numbers-in-clojure.html

Code ;; number_comparison_right_way.clj (= 7 7) (= 7 7.0) (type 7) (type 7.0) (= 7 7N) (type 7N) (= 7.0 7N) (type 7M) (= 7.0 7M) (= 7 7M) (= (double 7) 7.0) (== 7 7.0) (== 7 7.0M) (== 7.0 7M) (== Math/PI (/ 22 7 )) (== 7N 7M 7...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 22 May 2024
2 points (100.0% liked)

Clojure programming language discussion

451 readers
1 users here now

Clojure is a Lisp that targets JVM and JS runtimes

Finding information about Clojure

API Reference

Clojure Guides

Practice Problems

Interactive Problems

Clojure Videos

The Clojure Community

Clojure Books

Tools & Libraries

Clojure Editors

Web Platforms

founded 4 years ago
MODERATORS