Re: bigint discrepency

2010-07-10 Thread Armando Blancas
> Since 1.5 coerces to 1, shouldn't "1.5" also coerce to 1? The doc says "Coerce to BigInteger", but that doesn't include double- quoted numbers. If (bigint) can't make up what you give it, it'll try BigInteger(byte[] val) or BigInteger(String val). Java calls can create inconsistencies but in thi

Re: bigint discrepency

2010-07-10 Thread Miki
Hello Bill, > user=> (bigint "1") > 1 > user=> (bigint "1.5") > java.lang.NumberFormatException: For input string: > "1.5" (NO_SOURCE_FILE:0) > > Since 1.5 coerces to 1, shouldn't "1.5" also coerce to 1? This comes from Java's implementation of BigInteger user=> (new BigInteger "1.5") java.lang.Nu

bigint discrepency

2010-07-10 Thread .Bill Smith
I ran across this while editing http://clojure-examples.appspot.com: user=> (bigint 1) 1 user=> (bigint 1.5) 1 user=> (bigint "1") 1 user=> (bigint "1.5") java.lang.NumberFormatException: For input string: "1.5" (NO_SOURCE_FILE:0) Since 1.5 coerces to 1, shouldn't "1.5" also coerce to 1? user=>