ClojureDocs

Nav

Namespaces

Clojure/Conj 2026 — Charlotte, NC — Sept 30 - Oct 2 Learn More & Get Tickets →

signum

clojure.math

Available since 1.11 (source)
  • (signum d)
Returns the signum function of d - zero for zero, 1.0 if >0, -1.0 if <0.
If d is ##NaN => ##NaN
See: https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#signum-double-