summaryrefslogtreecommitdiff
path: root/src/jvm/clojure/lang/Numbers.java
AgeCommit message (Collapse)Author
2011-05-13inline min/max #784 - not contagious - do math inline for #{prim prim}, ↵Stuart Halloway
#{obj double} - delegate to gt/lt for #{obj long} #{obj obj} Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
2011-05-06Remove bit-ops' support for boxed numbers.Alexander Taggart
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
2011-04-29floats box as FloatsRich Hickey
2011-03-21get rid of checked exceptionsRich Hickey
2011-02-25#380: back out perf-killing andNot overloads. Not needed, since andNot is ↵Aaron Bedra and Stuart Halloway
static, not inline. Signed-off-by: Stuart Halloway <stu@Stuart-Halloways-MacBook-Air.local>
2011-02-25add missing overloads for numerics to prevent major performance regression ↵David Powell
due to clojure.core functions making slow reflective calls Signed-off-by: Stuart Halloway <stu@Stuart-Halloways-MacBook-Air.local>
2011-01-05Handle edge case in arbitrary-precision substraction. refs #690Colin Jones
Signed-off-by: Stuart Halloway <stu@Orolo.local>
2010-11-27Normalize uncheckeds, quotient, remainder. Inline quot and rem. ↵Rich Hickey
unchecked-foo-long are now just unchecked-foo.
2010-06-25incorporate BigIntequivRich Hickey
2010-06-23box longs-and-smaller as longsRich Hickey
2010-06-23add hashCode/equals to BigInt, refine number =, new method equal checks for ↵Rich Hickey
matching category before equivalence, move array and hashMap to equiv for keys
2010-06-18Allow ' as constituent characterRich Hickey
Bigints auto-reduce in all cases Restore +, *, -, inc, dec as auto-promoting ops, will never return primitive integers, will auto-promote even when given primitives. Add +', *', -', inc', dec', that do exactly what their counterparts do except when given integers of long or smaller, in which case they will not auto-promote but instead throw on overflow, and can return primitives. Return primitive doubles on all ops involving primitive doubles Box on long ops only after checking for overflow
2010-06-16return bigints from ratio ops only when bigint operandRich Hickey
2010-06-16bigdecs trump ratios when combinedRich Hickey
2010-06-16return doubles from quotient/remainder on doublesRich Hickey
2010-06-15Unify numeric semantics around longs, with throw on overflow. Allow numeric ↵Rich Hickey
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
2010-06-13incomplete work in progressRich Hickey
2010-06-12incomplete work in progressRich Hickey
2010-05-24eliminate reflection from bit-shift slow path #355Stuart Halloway
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
2010-04-30make == fail on non-numbersRich Hickey
2010-04-16division by negative ratio fix per Tristan KingStuart Halloway
2010-03-11made inc/dec of max/min Integer value return LongRich Hickey
2010-02-10inlined bit shifts, added definterface (undocumented for now)Rich Hickey
2009-11-24#209 Unifying array support for primativesunknown
Signed-off-by: Rich Hickey <richhickey@gmail.com>
2009-09-07fixed NPE when creating an empty array of ints, longs, floats or doubles, ↵Frantisek Sodomka
fixes #146 Signed-off-by: Chouser <chouser@n01se.net>
2009-05-28added reduce to quotient and remainderRich Hickey
2009-04-10Strongly typed minus throws too often [issue 101], patch from olov.lassusRich Hickey
2009-02-17merged lazy branch -r1236:1286Rich Hickey
2009-02-09added #_ ignore form reader macroRich Hickey
added IDeref above IRef, made delays and futures implement IDeref renamed/moved IRef.get() -> IDeref.deref() deref/@ maps to IDeref/deref added future-calls and future implement pmap on future implement pcalls on pmap
2009-01-14fix (- Integer/MAX_VALUE Integer/MIN_VALUE), patch from Achim PassenRich Hickey
2009-01-08fixed Integer/LongOps.Negate overflow when MIN_VALUERich Hickey
2008-12-29Make sure all integer ops return smallest representation, patch from ↵Rich Hickey
Christophe Grand fixed inc/dec long for max/min values
2008-12-14Moved to Eclipse Public License - see epl-v10.html orRich Hickey
http://opensource.org/licenses/eclipse-1.0.php
2008-12-08added unchecked-remainderRich Hickey
2008-10-04added inlining for integer bitopsRich Hickey
2008-07-22fixed truncation in double/long/float_arrayRich Hickey
2008-06-02added overload resolution supportRich Hickey
2008-06-02named int and long divide unchecked-divideRich Hickey
2008-06-01new primitives supportRich Hickey
2008-06-01interim checkin - DO NOT USE!Rich Hickey
2008-05-30added aset!, acloneRich Hickey
2008-05-28primitive vector supportRich Hickey
2008-05-27primitive vectors, in progressRich Hickey
2008-05-23added inlined math primitives in int/long/float/double namespacesRich Hickey
2008-05-21interim checkinRich Hickey
2008-04-14arbitrary precision bitopsRich Hickey
2008-04-11bitops in Numbers, from Stephen C. GilardiRich Hickey
2008-04-08added with-precision patch from Christophe GrandRich Hickey
2008-04-08added rationalize, fixed toRatio, added BigInteger and BigDecimal to ↵Rich Hickey
auto-imports
2008-04-07new numbers - all Num derivees should be not-in-use, all numbers are Java's ↵Rich Hickey
boxed Numbers, + Ratio, added support for BigDecimal