You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clojure supports BigInt and BigDecimal as numbers which can grow arbitrarily. There is also lexing support for both of these, such that the N suffix on an integer creates a BigInt and the M suffix creates a BigDecimal.
Steps
Determine if we're implementing these ourselves or bringing in a library
Explore libraries and determine best options based on run-time and compile-time performance
Add the lib as a submodule and hook it into cmake, if we are adding one
Add big_integer and big_decimal objects
Update C API with jank_create_big_integer and jank_create_big_decimal to aid in LLVM IR gen
Add operator overloads for them (follow ratio)
Don't worry about all of the math overloads for them for now; those aren't being used with LLVM IR gen right now anyway
Add lexing support for N and M suffixes, with tests
Update numeric lexing for integers to automatically use a big_integer if the number is too large for a native_integer, with tests
Update clojure.core/integer? and runtime::is_integer
Overview
Clojure supports BigInt and BigDecimal as numbers which can grow arbitrarily. There is also lexing support for both of these, such that the
N
suffix on an integer creates aBigInt
and theM
suffix creates aBigDecimal
.Steps
big_integer
andbig_decimal
objectsjank_create_big_integer
andjank_create_big_decimal
to aid in LLVM IR genN
andM
suffixes, with testsbig_integer
if the number is too large for anative_integer
, with testsclojure.core/integer?
andruntime::is_integer
clojure.core/bigint
,clojure.core/biginteger
,clojure.core/bigdec
,clojure.core/decimal?
big_integer
for its partsThe text was updated successfully, but these errors were encountered: