|
Real.roundUp(Rational(value, SafeLong(2).pow(bits - p))) |
Pointed out by @s5bug on Discord.
hmm why does it do this instead of a bitshift?
I assume it's something like 0b1.01 should round to 0b1.1, but you can just check a bit for that
instead of having to do a whole GCD