Email or username:

Password:

Forgot your password?
Top-level
Csepp 🌢

@neauoire What number representation is used here? It looks like the display format is integer part plus fraction. Are the individual component regular machine words or bignums?

6 comments
Devine Lu Linvega

@csepp A mixed fraction is a whole number and a portion less than 1 together, like 2 3/4.

Csepp 🌢

@neauoire So that's what they are called. But what's the whole number in memory? Like, what's the biggest number it can represent, and what happens in case of an overflow?

Devine Lu Linvega

@csepp fractions are made of two shorts, it'll overflow after 65k

Csepp 🌢

@neauoire Thanks! Well, not ideal but I guess fine for a toy. UwU

Devine Lu Linvega

@csepp it's really rare that I noodling around with numbers higher than 60 thousands, but I might add a warning or something at some point if that starts bothering me.

Go Up