Tootfinder

Opt-in global Mastodon full text search. Join the index!

@mgorny@social.treehouse.systems
2025-12-14 12:40:03

So the correct answer is 5 rounding directions, though the last one was added in #C23:
FP_INT_UPWARD / ceil()
FP_INT_DOWNWARD / floor()
FP_INT_TOWARDZERO / trunc()
FP_INT_TONEARESTFROMZERO / round()
FP_INT_TONEAREST / roundeven() (C23)

@mgorny@social.treehouse.systems
2025-12-13 09:01:56

Can you answer without checking: how many rounding directions does the #C standard define, as of #C23?
3
4
5
6