diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-11-09 13:53:57 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-11-09 13:53:57 -0500 |
| commit | c2aa5e9486b88f24703b833a55c85e525acb50df (patch) | |
| tree | e96a36d12d8c09f1635a0bb04929113174810504 /src/stdlib/numX.h | |
| parent | 75bb38a10c9fa069cfbc731a1f50e4f977447987 (diff) | |
Cut out a level of pointer indirection for integers by using underlying
struct
Diffstat (limited to 'src/stdlib/numX.h')
| -rw-r--r-- | src/stdlib/numX.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/numX.h b/src/stdlib/numX.h index fa8ae6d3..3d65cb59 100644 --- a/src/stdlib/numX.h +++ b/src/stdlib/numX.h @@ -69,11 +69,11 @@ MACROLIKE CONSTFUNC NUM_T NAMESPACED(from_int)(Int_t i, bool truncate) { fail("Could not convert integer to " TYPE_STR " without losing precision: ", i.small >> 2); return ret; } else { - NUM_T ret = mpz_get_d(*i.big); + NUM_T ret = mpz_get_d(i.big); if (!truncate) { mpz_t roundtrip; mpz_init_set_d(roundtrip, (double)ret); - if unlikely (mpz_cmp(*i.big, roundtrip) != 0) + if unlikely (mpz_cmp(i.big, roundtrip) != 0) fail("Could not convert integer to " TYPE_STR " without losing precision: ", i); } return ret; |
