[ACP Discussion] f32up and f32down suffixes

You can even make this a const fn, though that's a bit more verbose than a macro: const { round_up("3.14159265358979") }.

This is what we have in libm to support hex floats libm/src/math/support/hex_float.rs at 754daced79e320c6bc6d2a666a99a60a742c42c4 · rust-lang/libm · GitHub via a hf32! macro to enforce wrapping in const { ... }. (Well, for now it's just supporting PRs. But soon it will be used in-tree).

2 Likes

This topic was automatically closed 540 days after the last reply. New replies are no longer allowed.