Clojure

count silently overflows for sequences with more than Integer/MAX_VALUE elements

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.5
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Patch:
    Code

Description

Found by John Jacobsen: https://mail.google.com/mail/?shva=1#label/clojure/13fbba0c3e4ba6b7

user> (time (count (range (*' 1000 1000 1000 3))))
"Elapsed time: 375225.663 msecs"
-1294967296

Activity

Andy Fingerhut made changes -
Field Original Value New Value
Attachment clj-1229-count-overflow-patch-v1.txt [ 12060 ]
Andy Fingerhut made changes -
Patch Code [ 10001 ]
Alex Miller made changes -
Labels math

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated: