Skip to content

Instantly share code, notes, and snippets.

@number23
Created May 10, 2012 08:43
Show Gist options
  • Select an option

  • Save number23/2651934 to your computer and use it in GitHub Desktop.

Select an option

Save number23/2651934 to your computer and use it in GitHub Desktop.
Clojure numeric literals
Literal syntax Numeric type
42, 0xff, 2r111, 040 long (64-bit signed integer)
3.14, 6.0221415e23 double (64-bit IEEE floating point decimal)
42N clojure.lang.BigInt (arbitrary-precision integera)
0.01M java.math.BigDecimal (arbitrary-precision signed floating point decimal)
22/7 clojure.lang.Ratio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment