4 ms·
The 128-bit storage of ZFS reminds me a bit of TeX. As far as I can remember reading the TeX book, Don Knuth also wanted to play it safe. Internally, everything
by MaxMorlock 16y ago
The 128-bit storage of ZFS reminds me a bit of TeX.
As far as I can remember reading the TeX book, Don Knuth also wanted to play it safe. Internally, everything relies on integers (no floating point operations), and the smallest internal unit of measurement is less than the wavelength of light (don't remember the color ;-) ).
- andrewf 16y agoAt least one game programmer is recommending sticking with integers for distances. " 64 bits of precision gets you to the furthest distance of Pluto from the Sun (7.4 billion km) with sub-micrometer precision. " http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BA%20matter%20of%20precision%5D%5D http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BA%...
- fexl 16y agoI too played it safe and avoided floating point operations in the loom.cc code: https://loom.cc/?function=grid_tutorial&help=1 https://loom.cc/?function=grid_tutorial&help=1 All asset quantities are signed 128 bit integers under the hood. However, when the wallet interface displays a quantity, it uses a scale factor to place the decimal point. An asset type denominated in a fiat currency like USD or EUR typically uses a scale of 2. An asset type denominated in a commodity currency like GAU (grams of gold) typically uses a scale of 7, allowing a number like 31.1034768, which is the precise number of grams in a troy ounce. If you want to see it in kilograms, you can use scale 10.