Completed
Details
Assignee
UnassignedUnassignedReporter
Andy FingerhutAndy FingerhutApproval
OkPatch
Code and TestPriority
MinorFix versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Andy Fingerhut
Andy FingerhutApproval
Ok
Patch
Code and Test
Priority
Fix versions
Created April 7, 2013 at 10:35 PM
Updated August 15, 2013 at 12:13 AM
Resolved August 15, 2013 at 12:13 AM
The
bigint
andbiginteger
functions throw on double values outside of long rangeThis works fine:
but passing any Float or Double values outside the range of a long throw an exception:
Cause:
bigint
andbiginteger
cover a series of possible input cases but did not have an explicit case for Float or Double, so was falling back to default.Solution: Add check for Float/Double case that coerces the input to double, then uses BigDecimal.valueOf(), then converts to a BigInteger and so on as with other types.
Patch:
clj-1197-make-bigint-work-on-all-doubles-v1.txt