From 79f4a1f4ea4c50e6789632a2e2ea0a54c4a9fd4c Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 1 Jun 2022 17:47:31 -0400 Subject: [PATCH] WIP - bignum2 --- include/cyclone/types.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/cyclone/types.h b/include/cyclone/types.h index c87e8cde..a2023073 100644 --- a/include/cyclone/types.h +++ b/include/cyclone/types.h @@ -833,6 +833,22 @@ typedef struct { } \ } +/** + * @brief Exact integer of unlimited precision. + * + * TODO: describe this type + * + * Note memory is allocated directly on the heap to allow for numeric optimizations + * that can be performed if the amount of stack space used per allocation remains constant. + */ +typedef struct { + gc_header_type hdr; + tag_type tag; + uint32_t num_digits; + uint32_t sign; + // TODO: digits (implicit, after object??) +} bignum2_type; + /** * @brief Complex number */