Skip to content

Instantly share code, notes, and snippets.

@chadjoan
Last active January 15, 2024 08:10
Show Gist options
  • Save chadjoan/5b83406f31a0a41513364a11c89f29f4 to your computer and use it in GitHub Desktop.
Save chadjoan/5b83406f31a0a41513364a11c89f29f4 to your computer and use it in GitHub Desktop.
Dreaming of Fixed Point Math

I've always wanted a physics engine that uses fixed-point integers. No floats.

Why?

  • Consistent behavior across platforms.1234
  • Deterministic calculations become possible by avoiding non-deterministic quirks15.
    • If the citations from the last two points weren't enough, this page6 is a treasure trove! There are just too many examples of non-determinism and platform divergence for me to cite in this article. The amount of time and effort spent by talented individuals to force disparate systems to behave the same way, or find workarounds, would appear to be immense.
  • Have equivalent expressions yield equivalent numbers.78
  • Incrementing the number by 1 will always increment the number by 1.9
  • Easier representation of exact base-10 numbers, and potentially other rational numbers. [Footnote: Exactness]
    • If we chose a base-10 representation, we can now build all of your content with numbers like 0.000120 and have the object end up at EXACTLY 0.000120 and not at 0.000119999996968545019626617431640625. Here's a fun+useful tool 10 for playing with floating point representation.
  • No absorption problems. No rapidly diminishing accuracy when entities move away from the origin. Space ships no longer cleverly disassemble themselves for no apparent reason.11 The "Floating Origin" technique becomes optional rather than mandatory.
  • Branchless algorithms become easier to write because bitwise-conditional operations (like bitwise AND (&), OR (|), and XOR (^)) and bitshift operations (sometimes bit-rotation, if we're lucky) are commonly available for integers.
    • Branchless programming is very important for enabling/improving the use of SIMD instructions.
    • In terms of shader logic, this helps us avoid "Non-Uniform Flow Control"12.

Fixed-point integers still carry the disadvantage of sometimes requiring more memory to store them.

However, that downside is bounded:

128-bit fixed-point integers can represent any position in the observable universe with sub-atomic resolution. That's pretty much our worst-case scenario, and it is unlikely that anyone will need a bigger integer than that. And for a worst-case scenario, it really isn't a bad one to have.

We can probably get away with 64-bit integers in many cases. We can represent any location in our solar system, with micrometer precision, using 64-bit integers. 64-bit integers can represent velocities 10x the speed of light with (greater than) nanometer/second precision.

96-bit integers are probably pretty good too; more on that in a bit.

Table

I think it's helpful to get a feel for those capacities by comparing them with familiar things. So here is a chart that correlates various powers-of-2 (ex: bit widths) with various reference objects:

:   700,928,627,060        suns = 2^140 kg :   100,000,000,000        suns = Mass of Phoenix A, largest known (ultra-massive) black hole 13 :       171,125,153        suns = 2^128 kg :         5,347,661        suns = 2^123 kg :         4,297,000        suns = Mass of supermassive black hole at center of Milky Way 14 :         2,673,831        suns = 2^122 kg :                 1         sun = Mass of the Sun (by definition) :  1,988,500.00e+24   kilograms = Mass of the Sun 15 :  1,267,650.60e+24   kilograms = 2^100 kg 16 : 8,374,423,385,582 light-years = 2^96 meters = 79228162514264337593543950336 m 1716 :      1,898.00e+24   kilograms = Mass of Jupiter 18 :      1,237.94e+24   kilograms = 2^90 kg :   130,850,365,400 light-years = 2^90 meters =  1237940039285380274899124224 m 1716 :    94,000,000,000 light-years = Diameter of observable universe, 2006 calculations 19 :       597,000e+19   kilograms = Mass of the Earth 18 :       127,786,289 light-years = 2^80 meters :       120,893e+19       units = 2^80 units (kg, m, s) :        30,000,000 light-years = Distance across typical galactic cluster 20 :         7,300e+19   kilograms = Mass of Earth's Moon 18 :         1,300e+19   kilograms = Mass of Pluto 18 :           499,165 light-years = 2^72 meters :           472e+19       units = 2^72 units (kg, m, s) :           100,000 light-years = Plausible diameter of the Milky Way galaxy 2122 :            13e+19     (m³/s²) = Premultiplied mass of Sun with gravitational constant G = 6.674e-11. 18 :             1,950 light-years = 2^64 meters :           2.7e+18   kilograms = Mass of Death Star in Star Wars (estimates vary wildly) 23 :           1.2e+18       units = 2^60 units (kg, m, s) :               7.6 light-years = 2^56 meters :                 1 light-year  = 9.5e+15 meters : 9,460,730,472,581  kilometers = 1 light-year :   398,437,800,000 kilo-(m³/s²)= Premultiplied mass of Earth with gravitational constant G = 6.674e-11. 18 :   281,474,976,711  kilometers = 2^48 meters :    17,592,186,044  kilometers = 2^44 meters :     9,483,167,378 metric tons = Mass of WH40k Imperial Battleship 24 :     5,906,400,000  kilometers = Distance from Pluto to Sun 18 :     1,099,511,628  kilometers = 2^40 meters :       867,620,000 kilo-(m³/s²)= Premultiplied mass of Pluto with gravitational constant G = 6.674e-11. 18 :       149,600,000  kilometers = Distance from Earth to Sun 18 :        68,719,477  kilometers = 2^36 meters :        40,000,000 metric tons = Mass of Imperial Star Destroyer in Star Wars 25 :        31,536,000 kiloseconds = 1000 years (1 millennium) :         4,294,967  kilometers = 2^32 meters :         3,205,000 metric tons = Mass of USS Enterprise NCC-1701-E in Star Trek 26 :         3,153,600 kiloseconds = 100 years (1 century) :         1,391,400  kilometers = Diameter of the Sun 15 :           315,360 kiloseconds = 10 years (1 decade) :           299,793   km/second = Speed of light in a vacuum 27 :           268,435  kilometers = 2^28 meters :           142,984  kilometers = Diameter of Jupiter 18 :           101,605 metric tons = Mass of the "Gerald R. Ford", Largest aircraft carrier at time of writing 28 :            60,000  kilometers = Width or length of a Minecraft world 29 :            31,536 kiloseconds = 1 year :            16,777  kilometers = 2^24 meters :            12,756  kilometers = Diameter of the Earth 18 :             4,509  kilometers = Longest line through United States 30 :             4,350  kilometers = Span of Brazil from north to south 31 :             3,475  kilometers = Diameter of Earth's Mooon 18 :             2,376  kilometers = Diameter of Pluto 18 :             1,049  kilometers = 2^20 meters :         1,000,000      meters = 1,000 kilometers :         1,000,000   kilograms = 1,000 metric tons (basically Gigagrams) :           120,000      meters = Diameter of Death Star in Star Wars (estimates vary) 23 :            86,400     seconds = 1 day :            65,536      meters = 2^16 meters :            26,115      meters = Length of Xylem (city-ship) in Armored Core 6 32 :            10,000      meters = Span of Elden Ring's map 33 :             5,100      meters = Length of Britannia in Ultima Online 34 :             4,953      meters = Length of Strider (mining platform) in Armored Core 6 33 :             4,100      meters = Width of Britannia in Ultima Online 34 :             4,096      meters = 2^12 meters :             1,600      meters = Length of Imperial Star Destroyer in Star Wars 25 :             1,331   kilograms = Mass ("Curb Weight") of 2022 Honda Civic 35 :             1,000      meters = 1 kilometer :               686      meters = Length of USS Enterprise NCC-1701-E in Star Trek 26 :               362      meters = Length of the "Wonder of the Seas", Largest cruise ship at time of writing 36 :               333      meters = Length of the "Gerald R. Ford", Largest aircraft carrier at time of writing 28 :               256      meters = 2^8 meters :                91   kilograms = 200 pounds (lbs) :                45   kilograms = 100 pounds (lbs) :          1,000.00 millimeters = 2^0 meter or 1 meter :          1,000.00       grams = 2^0 kilograms or 1 kg :            600.00       grams = Mass of Glock 19 Compact 9mm Luger (handgun), without magazine 37 :            178.00 millimeters = 1 banana 38 :            120.00       grams = 1 banana 38 :             12.50       grams = Mass of Pentium 4 processor 39 :              8.00       grams = Approx. mass of 9x19mm Parabellum (Luger) bullet 40 :              3.91 millimeters = 1/(2^8) meters :              1.68       grams = Mass of .22LR bullet, on the small end41 :          1,000.00 micrometers = 1 millimeter :            100.00 micrometers = Median width of human hair 42 :             40.00 micrometers = Avg diameter of human skin cell 43 :             15.26 micrometers = 1/(2^16) meters :              1.00  milligrams = Mass of common black garden ant (Lasius niger) 44 :          1,000.00  nano-units = 1 micro-unit (1 micrometer) :            953.67  nano-units = 1/(2^20) units :            119.21  nano-units = 1/(2^23) units; 23 bits in a 32-bit float's mantissa :            100.00 nanoseconds = 1 hectonanosecond; D standard library's timer representation.4546 :            100.00 nanoseconds = Worst-case HPET timer resolution in x86 processors 47 :             70.00  nanometers = Size of COVID-19 virus particle, lower bound 48 :             69.84 nanoseconds = Typical HPET timer resolution (14.318 MHz) 49 :             59.60  nano-units = 1/(2^24) units :              3.73  nano-units = 1/(2^28) units :              2.50  nanometers = Width of human DNA 50 :          1,000.00  pico-units = 1 nano-unit (ex: 1 nanometer) :            250.00 picoseconds = Period of 4 GHz :            232.83  pico-units = 1/(2^32) units :            120.00  picometers = Van der Waals radius of Hydrogen Atom 51 :             14.55  pico-units = 1/(2^36) units :              7.28  pico-units = 1/(2^37) units :              3.64  pico-units = 1/(2^38) units :              0.91  pico-units = 1/(2^40) units :          1,000.00 femto-units = 1 pico-unit :            909.49 femto-units = 1/(2^40) units :             22.20 femto-units = 1/(2^52) units; 52 bits in a 64-bit float's mantissa :              1.00 femtometer  = Approx. "size" of a proton or neutron 52 :          0.000100 femtometers = Upper limit of a quark's "size" 52 :          0.000054 femto-units = 1/(2^64) units :        1.6156e-12   picograms = 1/(2^89) kilograms = 1.62e-27 kg :        1.6735e-12   picograms = Mass of hydrogen atom 53 = 1.67e-27 kg :        0.8078e-12   picograms = 1/(2^80) kilograms = 0.8078e-27 kg :        0.0126e-12   picograms = 1/(2^96) kilograms = 0.0126e-27 kg

Mass

If we look at the extremes of this chart, it will seem daunting, and mostly because mass has a large dynamic range. After all, it tends to be cubic in proportion to diameter or linear size. Still, even here, the humble 64-bit fixed point would likely represent the range of things that we would care about seeing involved in collisions: just measure in decigrams, and it becomes possible to represent everything from bullets to absurd Warhammer 40k space ships.

One only needs to bust out the large (256-bit to 320-bit) integers if they wanted to emulate the whole universe from ultra massive black holes and all the way down to subatomic particles. But at that point, the storage requirements for entity count would dwarf the memory requirements for mass data. A floating point representation might be pretty reasonable for such a purpose, on a Turing Machine with infinite memory.

For gravitational calculations, it might be helpful to observe that the mass is always multiplied by a gravitational constant:

$$ \mathrm{F_g(r)} = G \frac{m_1 m_2}{r^2} $$

$$ \mathrm{\ddot{r}_ {g1}(r)} = G \frac{m_2}{r^2} \qquad \mathrm{\ddot{r}_ {g2}(r)} = G \frac{m_1}{r^2} $$

Where $G = 6.674 \times 10^{-11}$. If large objects can have their mass stored pre-multiplied with G, then the pre-multiplied values will be much smaller and require about 33 to 34 fewer bits to store. Then our equations of motion are like so:

$$ \text{Let} \enspace H_ {G m_1} = G \times m_1 \text{;} \enspace \text{and} \enspace H_ {G m_2} = G \times m_2 $$

$$ \text{then} $$

$$ \mathrm{F_ {g_1}(r)} = \frac{m_1 H_ {G m_2}}{r^2} \qquad \mathrm{F_ {g_2}(r)} = \frac{H_ {G m_1} m_2}{r^2} $$

$$ \mathrm{\ddot{r}_ {g1}(r)} = \frac{H_ {G m_2}}{r^2} \qquad \mathrm{\ddot{r}_ {g2}(r)} = \frac{H_ {G m_1}}{r^2} $$

96-bit Integers

About those 96-bit values: Even though computers and programming languages don't typically provide a 96-bit integer datatype, it might still be advantageous to store and compute 96-bit values. This is likely to have benefits (compared to 128-bit values), such as requiring fewer rounds of software multiplication (ex: Karatsuba), especially when a platform requires 32-bit multiplication inputs for lossless multiplication into 64-bit output(s). Notably, section 8.8 in the GLSL (OpenGL Shading Language) specification (version 4.60.8)54 presents various useful add-with-carry and multiply-32-to-64 operations that would potentially make it performant to use 96-bit integers composed of three 32-bit integers. Beyond 64 bits, we're likely to be storing our integers as pairs/triplets/quads of primitive integer types regardless, so 128-bit wouldn't necessarily be any more convenient, either.

Overflow and Carry

If it is important to carefully control any overflow in some calculations, then larger integers can be used for intermediate calculations. Once the calculation reaches a point where truncation becomes acceptable or can be monitored, truncate them back into their compact representation.

Notably, depending on what hardware is available or how an implementation is written, it might be a good idea to leave space for carry bits. Remember how 64-bits could represent any location in our solar system with micrometer precision? Well, 63 bits will work just fine as well. And a 63-bit representation has the advantage that any add operations will overflow into the 64th bit, thus allowing algorithms to avoid requirements of extra temporaries and reduce the amount of operations required to detect overflow and store carry information. Of course, on better days, our hardware will set carry flags for us, so this concern is very circumstantial.

Warranty Disclaimer

(There is no warranty.)

I should probably point out that this writing was not born from some desire to replace floating point numbers everywhere. They are still very helpful in situations where quantities have log-exponential relationships and correctness is best-effort. (So we're thinking "I'll make it work!" rather than "I need it to just work.") One example is light intensity and perceived brightness, which have a very non-linear relationship, and are important in computer graphics. Sound and sound perception also have similar concerns. Floating point numbers are often just fine for these things.

But outside of that, integers might be underrated. Notably, things like positions of objects and points in time do NOT have log-exponential relationships with each other. Time tends to pass at a constant rate, leading to a linear relationship between world-time and IRL-time. Position tends to be traversed in a linear fashion (constant velocity) or a quadratic fashion (constant acceleration).

$\text{\huge{闇} \tiny{(Darkness)}}$

Unfortunately, I do not know of any physics engines that support fixed-point arithmetic. And I worry that if I found one, that it wouldn't support tuning the size and resolution of the fixed-point integers used (like with template parameters). If anyone knows of one, please leave a comment!

Footnote

[Footnote: Exactness]: I have read various arguments55 stating that56 the error in floating point is very small, and that we should just not care57 about the imprecision. For most human things, it will be imperceivable. This is true; I agree. However, my concern is more about arithmetic properties, and how they affect our workflows and the correctness of our programs. For instance, it becomes harder to write tests when expressions like assert(0.01*10 == 0.1); cause assertion failures, even though they look correct. This doesn't happen much, but when it does, we'll probably end up with fewer tests, or more expensive code. Also, when I have some function f, and its inverse g, then I expect x == f(g(x)) to be true (always!). But with floating point calculations, this easily becomes "false". Whether it's false by just a little bit, or a lot, does not matter one bit. The arithmetic property of identity was broken, and the code became much more difficult to reason about.

Citations

Footnotes

  1. https://qr.ae/pKZ5JO  (John Gustafson's answer to "Why do different types of computers use slightly different floating point math?" on Quora; 2023-05-16) 2

  2. https://stackoverflow.com/questions/2342396/why-does-this-floating-point-calculation-give-different-results-on-different-mac/2343351#2343351 (Eric Lippert's answer to "Why does this floating-point calculation give different results on different machines?"; answered 2010-02-26; edited 2017-05-23; accessed 2023-12-27)

  3. https://community.intel.com/t5/Intel-Fortran-Compiler/Floating-Point-Differences-Between-Machines/td-p/1110690 (Forum Post: "Floating Point Differences Between Machines" by James Pearson on ‎2016-08-24, and replies by others.)

  4. https://jvns.ca/blog/2023/01/13/examples-of-floating-point-problems/#example-4-different-languages-sometimes-do-the-same-floating-point-calculation-differently ("Examples of floating point problems" by Julia Evans, example 4; 2023-01-13)

  5. https://news.ycombinator.com/item?id=9837342 (Reply to "Essential facts about floating point calculations {mortoray.com}" by zubspace on 2015-07-06)

  6. https://gafferongames.com/post/floating_point_determinism/ ("Floating Point Determinism" by Glenn Fiedler; 2010-02-24)

  7. https://jvns.ca/blog/2023/01/13/examples-of-floating-point-problems/#example-7-splitting-a-page-into-columns ("Examples of floating point problems" by Julia Evans, example 7; 2023-01-13)

  8. https://jvns.ca/blog/2023/01/13/examples-of-floating-point-problems/#example-8-collision-checking ("Examples of floating point problems" by Julia Evans, example 8; 2023-01-13)

  9. https://jvns.ca/blog/2023/01/13/examples-of-floating-point-problems/#example-6-the-inaccurate-timestamp ("Examples of floating point problems" by Julia Evans, example 6; 2023-01-13)

  10. https://www.h-schmidt.net/FloatConverter/IEEE754.html ("IEEE-754 Floating Point Converter"; accessed 2023-12-22)

  11. https://jvns.ca/blog/2023/01/13/examples-of-floating-point-problems/#example-5-the-deep-space-kraken ("Examples of floating point problems" by Julia Evans, example 5; 2023-01-13)

  12. https://www.khronos.org/opengl/wiki/Sampler_(GLSL)#Non-uniform_flow_control (accessed 2023-12-27)

  13. https://www.universetoday.com/160379/ultra-massive-black-holes-how-does-the-universe-produce-objects-so-massive/ ("Ultra-Massive Black Holes: How Does the Universe Produce Objects So Massive?" by Evan Gough; 2023-03-03)

  14. https://www.aanda.org/articles/aa/full_html/2023/09/aa47416-23/aa47416-23.html ("Polarimetry and astrometry of NIR flares as event horizon scale, dynamical probes for the mass of Sgr A*" by The GRAVITY collaboration: R. Abuter et al.; 2023-09-06)

  15. https://nssdc.gsfc.nasa.gov/planetary/factsheet/sunfact.html ("Sun Fact Sheet" by Dr. David R. Williams; accessed 2023-12-23) 2

  16. https://www.omnicalculator.com/math/power-of-2 ("Power of 2 Calculator" by Arturo Barrantes; 2023-06-05) 2 3

  17. https://www.unitconverters.net/length/meter-to-light-year.htm (accessed 2023-12-24) 2

  18. https://nssdc.gsfc.nasa.gov/planetary/factsheet/index.html ("Planetary Fact Sheet - Metric" by Dr. David R. Williams; accessed 2023-12-23) 2 3 4 5 6 7 8 9 10 11 12 13

  19. https://imagine.gsfc.nasa.gov/educators/programs/cosmictimes/educators/guide/age_size.html ("Age & Size of the Universe Through the Years"; accessed 2023-12-24)

  20. https://www.universetoday.com/30522/galaxy-cluster/ ("Galaxy Cluster" by Fraser Cain; 2009-05-06)

  21. https://www.aanda.org/articles/aa/abs/2018/04/aa32880-18/aa32880-18.html ("Disk stars in the Milky Way detected beyond 25 kpc from its center" by M. López-Corredoira et al.; 2018-05-07)

  22. https://web.archive.org/web/20231223173116/https://en.wikipedia.org/wiki/Milky_Way

  23. https://www.reddit.com/r/theydidthemath/comments/12ywchu/request_how_much_would_the_death_star_weigh/ ("How much would the Death Star weigh?"; accessed 2023-12-27) 2

  24. https://www.reddit.com/r/40kLore/comments/plwvdu/calculating_weights_and_measurements_for_the/ ("Calculating weights and measurements for the Imperial Navy" by user named "Faraday"; published 2021; accessed 2023-12-27)

  25. https://web.archive.org/web/20231226083911/https://en.wikipedia.org/wiki/Star_Destroyer 2

  26. https://web.archive.org/web/20231202014829/https://en.wikipedia.org/wiki/USS_Enterprise_(NCC-1701-E) 2

  27. https://www.nist.gov/si-redefinition/definitions-si-base-units (accessed 2023-12-26)

  28. https://www.navy.mil/Resources/Fact-Files/Display-FactFiles/Article/2169795/aircraft-carriers-cvn/ ("Aircraft Carriers - CVN"; 2021-11-12) 2

  29. https://www.thegamer.com/minecraft-world-size-area-volume/ ("How Big Is A Minecraft World?" by Jacqueline Zalace; 2023-11-11)

  30. https://sprott.physics.wisc.edu/pickover/pc/american-line.html ("The Longest Line in America!" by Dr. Cliff Pickover; accessed 2023-12-27)

  31. https://www.britannica.com/place/Brazil ("Brazil" by E. Bradford Burns et al.; 2023-12-26)

  32. https://youtu.be/VRmz4bBguJE?si=6lhwZqxma3cat3GP&t=72  ("How big is the Xylem?" by Zullie the Witch)

  33. https://youtu.be/F9XHn33WWHo?si=ZdEqAlNUp-jfdKXi&t=81  ("How big is the Strider?" by Zullie the Witch) 2

  34. https://youtu.be/FatnxX0F57M?si=7AiI1QFvXAOzQo04&t=117 ("Ultima Online Second Age - How BIG is BRITANNIA?" by Blade Spirit) 2

  35. https://www.headquarterhonda.com/research/new-honda-civic-dimensions-weight/ ("2022 Honda Civic Weight & Dimensions"; accessed 2023-12-27)

  36. https://vesselregister.dnv.com/vesselregister/details/38209 ("Wonder of the Seas"; accessed 2023-12-24)

  37. https://eu.glock.com/en/products/pistols/g19 ("Glock 19 Compact 9mm Luger"; accessed 2023-12-27)

  38. http://bananaforscale.info/#!/convert/length/1/bananas/millimeters ("Banana for Scale"; accessed 2023-12-24) 2

  39. https://www.intel.com/Assets/PDF/datasheet/310308.pdf ("Intel® Pentium® 4 Processor 6x1∆ Sequence" section 3.6 "Processor Mass Specification"; published 2007-01, accessed 2023-12-27)

  40. https://web.archive.org/web/20231221051002/https://en.wikipedia.org/wiki/9%C3%9719mm_Parabellum#U.S._data (accessed 2023-12-27)

  41. https://www.mcarbo.com/22LR-Ballistics-Chart ("22LR Ballistics Chart for 27 Cartridges" by Chris Nelson; accessed 2023-12-27)

  42. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4201279/ ("The structure of people’s hair" by Fei-Chi Yang, Yuchen Zhang, and Maikel C. Rheinstädter; 2014-10-14)

  43. https://www.researchgate.net/publication/261384224_An_investigation_of_electromagnetic_field_effect_on_a_human_skin_cell_using_numerical_method_approaches ("An investigation of electromagnetic field effect on a human skin cell using numerical method approaches" by Mohd Muzafar Ismail et al.; 2011-12)

  44. https://www.findingdulcinea.com/how-much-does-an-ant-weigh/ ("How Much Does an Ant Weigh? The Real Weight of Ants Revealed" by Colleen Brondou; 2023-04-29)

  45. https://dlang.org/phobos/std_datetime_systime.html#SysTime (accessed 2023-12-26)

  46. https://dlang.org/phobos/core_time.html (accessed 2023-12-26)

  47. https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/software-developers-hpet-spec-1-0a.pdf

  48. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7579175/ ("Minimum Sizes of Respiratory Particles Carrying SARS-CoV-2 and the Possibility of Aerosol Generation" by Byung Uk Lee; 2020-09-23)

  49. https://web.archive.org/web/20231214101752/https://en.wikipedia.org/wiki/High_Precision_Event_Timer#Comparison_to_predecessors

  50. https://www.nano.gov/nanotech-101/what/nano-size ("Size of the Nanoscale"; accessed 2023-12-24)

  51. https://periodictable.com/Properties/A/VanDerWaalsRadius.v.html ("Van Der Waals Radius of the elements"; accessed 2023-12-24)

  52. https://www.pbs.org/wgbh/nova/article/smaller-than-small ("Smaller than Small: Looking for Something New With the LHC" by Don Lincoln; 2014-10-28) 2

  53. https://chem.libretexts.org/Bookshelves/General_Chemistry/Map%3A_Chemistry_-_The_Central_Science_(Brown_et_al.)/02%3A_Atoms_Molecules_and_Ions/2.04%3A_Atomic_Mass ("Atomic and Molecular Weights"; accessed 2023-12-27)

  54. https://registry.khronos.org/OpenGL/specs/gl/GLSLangSpec.4.60.pdf

  55. https://en.algorithmica.org/hpc/arithmetic/float/ ("Floating-Point Numbers"; accessed 2023-12-26)

  56. https://www.evanjones.ca/floating-point-money.html ("You can use floating-point numbers for money" by Evan Jones; 2020-01-24)

  57. https://stackoverflow.com/a/10771515/1261963 (Answer by "Gort the Robot" to the question "Why aren't rational numbers implemented and stored as fractions with zero loss of information?"; 2012-05-27)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment