From 9bc18cb6174ff563c18a1ca9b462c58971b51733 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 28 Mar 2025 13:46:35 -0400 Subject: Fix some minor floating point promotion issues --- src/stdlib/nums.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdlib/nums.h') 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); } -- cgit v1.2.3