Fabian Giesen on Nostr: npub1f3nlr…me887 FWIW, no compiler that I'm aware of implements this, but the ...
npub1f3nlrmpjja65pzmvlegyl27l0y2m007nncxttdwqndrejajvdzas2me887 (npub1f3n…e887) FWIW, no compiler that I'm aware of implements this, but the actual solution is sext int32->int64, convert int64->float64, float64 divide, convert back to int32 with truncate.
I've only ever needed this for narrower ranges where I could comfortably work in float32 instead and you need to be a bit careful with this kind of thing because of double-rounding but in this case, pretty sure there's no issue.
(I'd need to write a proof to be sure but with float64 there's plenty of margin.)
I've only ever needed this for narrower ranges where I could comfortably work in float32 instead and you need to be a bit careful with this kind of thing because of double-rounding but in this case, pretty sure there's no issue.
(I'd need to write a proof to be sure but with float64 there's plenty of margin.)