diff options
Diffstat (limited to 'core/math/big/helpers.odin')
| -rw-r--r-- | core/math/big/helpers.odin | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/math/big/helpers.odin b/core/math/big/helpers.odin index 8ab19e3e7..35be4f1fd 100644 --- a/core/math/big/helpers.odin +++ b/core/math/big/helpers.odin @@ -777,6 +777,11 @@ int_from_bytes_little_python :: proc(a: ^Int, buf: []u8, signed := false, alloca */ INT_ONE, INT_ZERO, INT_MINUS_ONE, INT_INF, INT_MINUS_INF, INT_NAN := &Int{}, &Int{}, &Int{}, &Int{}, &Int{}, &Int{} +@(init, private) +_init_constants :: proc() { + initialize_constants() +} + initialize_constants :: proc() -> (res: int) { internal_set( INT_ZERO, 0); INT_ZERO.flags = {.Immutable} internal_set( INT_ONE, 1); INT_ONE.flags = {.Immutable} @@ -788,7 +793,7 @@ initialize_constants :: proc() -> (res: int) { */ internal_set( INT_NAN, 1); INT_NAN.flags = {.Immutable, .NaN} internal_set( INT_INF, 1); INT_INF.flags = {.Immutable, .Inf} - internal_set( INT_INF, -1); INT_MINUS_INF.flags = {.Immutable, .Inf} + internal_set(INT_MINUS_INF, -1); INT_MINUS_INF.flags = {.Immutable, .Inf} return _DEFAULT_MUL_KARATSUBA_CUTOFF } |