Hacker News new | comments | show | ask | jobs | submit login

Yep, that's called "fixed point arithmetic". The multiplier is called a "scaling factor". You typically have to "rescale" after each multiply operation by dividing the result by the scaling factor, but you've done that implicitly by not scaling integer values like 7.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact