Applying Fixed Point Numbers for Astronomy
Main Author: | Georgii Karelin |
---|---|
Other Authors: | Martijn van Iersel |
Format: | info Proceeding Journal |
Bahasa: | eng |
Terbitan: |
, 2020
|
Subjects: | |
Online Access: |
https://zenodo.org/record/4279768 |
Daftar Isi:
- Abstract: Scientists are concerned with describing the real world using mathematical abstractions. They often take the form of formulas, in many cases equations, differential, integral. However, it turns out very quickly that most of the real problems cannot be solved analytically. Then they have to be solved numerically, using computers. In fact, the text of reality is translated into the language of formulas, after which they are translated into programming languages. But any translation is imperfect and prone to loss and distortion. It is helpful to remember that ultimately everything will need to be translated into computer language. Sometimes, you can try to write in it right away, but this requires restructuring and supplementing the standard process of scientific thinking. In addition, it is important to take into account the peculiarities of the problem, which will determine the algorithms used and the types of data representations. Before the widespread adoption of floating point numbers, a different standard, fixed point numbers, was widely used in scientific modeling. This format has many advantages, such as implementation elegance and computational speed, and one of the main drawbacks is the circular overflow behavior. However, in tasks related to measuring angles and other cyclic values, this behavior, on the contrary, is a huge advantage, since it automatically ensures that the values are kept in the required range, maintains the same accuracy and increases the determinism of calculations, reducing the level of machine errors. For this reason, binary angular measurements are finding applications in robotics, games, and real-time applications. Another advantage is that fixed-point numbers help to get rid of some of the conditional operators, which allows you to achieve the so-called branchless programming and speed up calculations on modern processors. The report will talk about the use of Binary Angular Measurement to study the evolution of the rotation of asteroids and planetary satellites. We will discuss the possibility of realizations of the prototype integrator of rotation equations in C programming languages using the Allegro library and the implementation of a model problem on FPGA are compared (that part was excluded from final presentation due to strict time limit) Inspiration: One of the first publications I read during my research on this topic, almost a couple of years ago, was a blog post titled "Sin & Cos: The Programmer's Pals!" https://www.helixsoft.nl/articles/circle/sincos.htm I can remember the date quite accurately because I found this article thanks to Hacker News entry: https://news.ycombinator.com/item?id=16526942 As, I found out later, its author was Dr. Martijn van Iersel, one of the developers of the Allegro library: https://www.allegro.cc/manual/5/fixed.html which has support for fixed-point numbers and binary angles. Communication with him and discussion of issues helped to better understand the pros and cons of this idea, and most importantly, led to the realization that ordinary fixed-point numbers and binary angular measurements are two different entities, albeit very similar. Therefore, I am very grateful to him for his help. Naming: BRANGLEZ = Binary Radian ANGLEZ "Typo" in letter "Z" is for searchability and uniqueness. "Fixed-point" and "binary" are rather unlucky name when somebody try to find it. Acknowledgement: The reported study was funded by RFBR according to the research project 19-02-00811. https://www.rfbr.ru/rffi/eng
- The reported study was funded by RFBR according to the research project 19-02-00811. Presentation edited for Zenodo. All pictures that are at least a little controversial from the point of view of copyright (but fall under fair use) have been replaced with text-description or a link. All other images in the report were created by the author, or are not subject to copyright, or are distributed under a free license. Added explanatory text. The presentation should now be relatively self-explanatory.