Tag: trivial
-
perl: rounding KiB values to MiB boundaries
When you have to deal with kilobyte or kibibyte values in today’s real-world computers, you often want extremely similar values to evaluate to “equal”. An easy solution is to round them to full Mebibytes. This can be easily done in every programming language which supports integer division and the modulo operator. For example in Perl:…