diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 13:46:35 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 13:46:35 -0400 |
| commit | 9bc18cb6174ff563c18a1ca9b462c58971b51733 (patch) | |
| tree | e57e42ed40d1ffa1e6c402841f32b7efdd910796 /src/stdlib/nums.h | |
| parent | a79b3c2216d386e705603c6dcbf10c1c391fcd99 (diff) | |
Fix some minor floating point promotion issues
Diffstat (limited to 'src/stdlib/nums.h')
| -rw-r--r-- | src/stdlib/nums.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/nums.h b/src/stdlib/nums.h index f355fb6f..3f0cccc8 100644 --- a/src/stdlib/nums.h +++ b/src/stdlib/nums.h @@ -100,7 +100,7 @@ MACROLIKE CONSTFUNC float Num32$from_int(Int_t i, bool truncate) { float ret = (float)mpz_get_d(*i.big); if (!truncate) { mpz_t roundtrip; - mpz_init_set_d(roundtrip, ret); + mpz_init_set_d(roundtrip, (double)ret); if unlikely (mpz_cmp(*i.big, roundtrip) != 0) fail("Could not convert integer to 32-bit floating point without losing precision: ", i); } |
