350 rub
Journal Information-measuring and Control Systems №5 for 2025 г.
Article in number:
Implementation of floating-point arithmetic with adjustable mantissa length in the HomeLisp system
Type of article: scientific article
DOI: https://doi.org/10.18127/j20700814-202505-05
UDC: 51-37
Authors:

B.L. Faifel¹

¹Yuri Gagarin State Technical University of Saratov (Saratov, Russia)

¹catstail@ya.ru

Abstract:

The standard bit depth of the double type (16-17 significant digits) may not be enough when performing calculations with high accuracy. This makes it urgent to create a library for working with floating-point numbers that allows you to use a mantissa of any desired length, as well as to create a methodology for determining the minimum length of the mantissa, ensuring that the result is obtained with the required accuracy. Aim of article is to create a library of arithmetic floating-point numbers, the length of the mantissa of which can be set by the programmer. The library should work in decimal notation and be used to calculate transcendental functions by summing series. Another goal of the work is the method of determining the minimum length of the mantissa, providing the required number of correct significant digits of the result.

The article describes the SuperFloat library, designed for floating-point calculations with adjustable mantissa length. A method is given for determining the minimum mantissa length sufficient to obtain a given number of correct significant digits of the result. The library uses decimal numbers. The article describes the results of calculating trigonometric functions based on direct summation of the corresponding Taylor series. The results obtained are compared with the results of calculations performed in rational arithmetic (rational numbers of unlimited bit depth are processed without error). The described library can be used to verify calculations of standard functions. Another use of the library may be training courses on the specifics of floating-point arithmetic.

Pages: 55-60
For citation

Faifel B.L. Implementation of floating-point arithmetic with adjustable mantissa length in the HomeLisp system. Information-measuring and Control Systems. 2025. V. 23. № 5. P. 55−60. DOI: https://doi.org/10.18127/j20700814-202505-05 (in Russian)

References
  1. Mak-Kraken D., Dorn U. Chislennye metody i programmirovanie na Fortrane. M.: Mir. 1977. (in Russian)
  2. Anureev I.S., Bodin E.V., Kondratev D.A., Promskii A.V., Shilov N.V., Shilova S.O., Faifel B.L. Formalnaya spetsifikatsiya i verifikatsiya standartnykh matematicheskikh funktsii. Tezisy Mezhdunar. konf. MARChUKOVSKIE NAUChNYE ChTENIYa. 2019. S. 17−18. Akademgorodok. Novosibirsk. Rossiya. (in Russian)
  3. Lutts M. Izuchaem Piton. M.: Dialektika. 2023. 1552 c. (in Russian)
  4. Shild G. Java. Polnoe rukovodstvo. M. Dialektika. 2023. 1345 c. (in Russian)
  5. Internet-resurs: http://homelisp.ru. (in Russian)
  6. HomeLisp – prostaya realizatsiya yazyka Lisp 1.5 dlya tselei obucheniya. Vestnik NGU. Ser. "Informatsionnye tekhnologii". 2012. T. 10. № 3. S. 105. (in Russian)
  7. Novye vozmozhnosti sistemy HomeLisp. Trudy konf. "Yazyki programmirovaniya i kompilyatory". 3−5 aprelya 2017 g. S. 252. (in Russian)
  8. Bolotyuk V.A., Bolotyuk L.A. O primenenii HomeLisp v protsesse obucheniya matematike. Naukovedenie (Internet-zhurnal). 2015. T. 7. № 5. (in Russian)
  9. Faifel B.L. Osobennosti prepodavaniya osnov vychislenii s plavayushchei tochkoi. Trudy seminara 12-i Mezhdunar. Ershovskoi konf. po informatike (PSI'19). 2–3 iyulya 2019 g. Sb. nauch. statei "Informatika obrazovaniya". In-t sistem informatiki im. A.P. Ershova SO RAN. Novosibirsk: IPTs Novosibirskogo gos. un-ta. 2019. (in Russian)
  10. Grem P. ANSII Common Lisp. SPb.: Simvol-plyus. 2012. 448 c. (in Russian)
  11. Abelson Kh., Sassman D.D. Struktura i interpretatsiya kompyuternykh programm. M.: Dobrosvet. KDU. 2012. 608 s. (in Russian)
Date of receipt: 19.08.2025
Approved after review: 02.09.2025
Accepted for publication: 22.09.2025