Zulip Chat Archive
Stream: new members
Topic: Round up/down
Junjie Bai (Mar 13 2024 at 06:04):
Is there a function round up/down a rational number to an integer?
Timo Carlin-Burns (Mar 13 2024 at 06:10):
I think docs#Int.floor and docs#Int.ceil are the preferred way of talking about rounding up and down to integers. They're defined more generally, but can still be used for rational numbers. There's also docs#Rat.floor and docs#Rat.ceil. I don't know if there would ever be a reason to prefer those more specialized functions
Junjie Bai (Mar 13 2024 at 06:12):
that really helps, thank you!
Last updated: May 02 2025 at 03:31 UTC