clojure:num

Last commit made on 2010-06-17
Get this branch:
git clone -b num https://git.launchpad.net/clojure

Branch merges

Branch information

Name:
num
Repository:
lp:clojure

Recent commits

863decc... by Rich Hickey <email address hidden>

Util.equals unboxed support for long/double

4003a1c... by Rich Hickey <email address hidden>

tighten up narrowing conversion checks

e526bb8... by Rich Hickey <email address hidden>

tighten up numeric comparisons

a1a25da... by Rich Hickey <email address hidden>

return bigints from ratio ops only when bigint operand

d97599c... by Rich Hickey <email address hidden>

bigdecs trump ratios when combined

db653b5... by Rich Hickey <email address hidden>

canonic boxing of floats and longs in array seqs

e4a76e0... by Rich Hickey <email address hidden>

return doubles from quotient/remainder on doubles

0deef3e... by Rich Hickey <email address hidden>

fix hashcode of empty lazy seq

26e50c3... by Rich Hickey <email address hidden>

remove unchecked-inc from amap, areduce

6ab3e4c... by Rich Hickey <email address hidden>

Unify numeric semantics around longs, with throw on overflow. Allow numeric literals to be primitive initializers. Canonicalize boxing of integers, if it fits in int, is Integer, else Long, thus primitive coercions can't be used to get particular boxed types, use Long/valueOf etc. Ask for BigIntegers if you want arbitrary precision, new literal number format - append 'N' for BigInteger. BigIntegers do not reduce automatically, are contagious. New particular names for unchecked ops - unchecked-xxx-int or unchecked-xxx-long. You should need far fewer hints for primitive perf, and avoid int casts and any casting of numeric literals, see:
http://gist.github.com/440102