numbers, radix, arbitrary precision in Clojure
Code
;; numbers.clj
17
017
;; O17 ;; error
0.17
00.17
8r17
0X17
0x17
16r17
16R17
;; 16r-17 ;; error
-16r17
;; 0x-17 ;; error
-0x17
;; 0x17.34 ;; error
;; 16r17.34
;; 7r17 ;; error
;; 4r17 ;; error
4r3312
32r3V
32rv
2r1101
17e-1
17e1
17e0
17e2
17E2
17M
(type 17)
(type 17M)
17N
(type 17N)
(type 36423423764873243274826382842847821045094295794597947598)
36423423764873243274826382842847821045094295794597947598
994824757458783748579437258798745.278375725925479247582945754
994824757458783748579437258798745.278375725925479247582945754M
(type 994824757458783748579437258798745.278375725925479247582945754M)
(* 2
994824757458783748579437258798745.278375725925479247582945754M)