diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-11-24 20:22:36 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-11-24 20:22:36 -0500 |
| commit | bbf7a60dcd524c2d86ac7efe7bc97d4a627b6d15 (patch) | |
| tree | 837ef8f4df015ed82c6df2fff012cd3845698965 /src/stdlib/bigint.h | |
| parent | 04ea51a81720be79170f185879a465e7020ed42b (diff) | |
Fix `from_num` incomplete renaming
Diffstat (limited to 'src/stdlib/bigint.h')
| -rw-r--r-- | src/stdlib/bigint.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/bigint.h b/src/stdlib/bigint.h index 614e1501..a00bdf2f 100644 --- a/src/stdlib/bigint.h +++ b/src/stdlib/bigint.h @@ -189,13 +189,13 @@ MACROLIKE PUREFUNC bool Int$is_negative(Int_t x) { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wfloat-equal" #endif -MACROLIKE PUREFUNC Int_t Int$from_num(double n, bool truncate) { +MACROLIKE PUREFUNC Int_t Int$from_num64(double n, bool truncate) { mpz_t result; mpz_init_set_d(result, n); if (!truncate && unlikely(mpz_get_d(result) != n)) fail("Could not convert to an integer without truncation: ", n); return Int$from_mpz(result); } -MACROLIKE PUREFUNC Int_t Int$from_num32(float n, bool truncate) { return Int$from_num((double)n, truncate); } +MACROLIKE PUREFUNC Int_t Int$from_num32(float n, bool truncate) { return Int$from_num64((double)n, truncate); } MACROLIKE Int_t Int$from_int64(int64_t i) { if likely (i >= SMALLEST_SMALL_INT && i <= BIGGEST_SMALL_INT) return (Int_t){.small = (i << 2L) | 1L}; mpz_t result; |
