|
|
|
||||||||||
![]() |
|
|
Carl Martin C with Inline Assembly |
|
|||||||
|
This is some of my older code from back in the day when hard disk storage and RAM were expensive per megabyte. Posed with the problem of tight space constraints and potentially billions of records, a strategy was need to maximize the amount of data stored per unit of space. Though this problem soon became less of a concern, its solution illustrates an ability to think outside the usual box — an ability to grow new technology. The link below will show you the test code. A method was created to store stellar coordinates in a more compact form. It was noted that most star catalogs typically list distances, and other parameters with only three significant digits or less. First a strategy was needed for storing such light-weight numbers, similar to the method used to store floats of single or double precision. Then a method was needed to convert normal floats into this new, "tiny" float format, for storage, then convert those numbers back into normal floats for standard program use, on an as-needed basis. The code shows the storage strategy and the code for compacting and extracting this "tiny" float data type. |
||||||||||