IDEAS home Printed from https://ideas.repec.org/a/gam/jeners/v14y2021i4p1058-d501066.html
   My bibliography  Save this article

Fast Calculation of Cube and Inverse Cube Roots Using a Magic Constant and Its Implementation on Microcontrollers

Author

Listed:
  • Leonid Moroz

    (Department of Information Technologies Security, Institute of Computer Technologies, Automation, and Metrology, Lviv Polytechnic National University, 79013 Lviv, Ukraine)

  • Volodymyr Samotyy

    (Department of Automatic Control and Information Technology, Faculty of Electrical and Computer Engineering, Cracow University of Technology, 31155 Cracow, Poland)

  • Cezary J. Walczyk

    (Department of Mathematical Methods in Physics, Faculty of Physics, University of Bialystok, 15245 Bialystok, Poland)

  • Jan L. Cieśliński

    (Department of Mathematical Methods in Physics, Faculty of Physics, University of Bialystok, 15245 Bialystok, Poland)

Abstract

We develop a bit manipulation technique for single precision floating point numbers which leads to new algorithms for fast computation of the cube root and inverse cube root. It uses the modified iterative Newton–Raphson method (the first order of convergence) and Householder method (the second order of convergence) to increase the accuracy of the results. The proposed algorithms demonstrate high efficiency and reduce error several times in the first iteration in comparison with known algorithms. After two iterations 22.84 correct bits were obtained for single precision. Experimental tests showed that our novel algorithm is faster and more accurate than library functions for microcontrollers.

Suggested Citation

  • Leonid Moroz & Volodymyr Samotyy & Cezary J. Walczyk & Jan L. Cieśliński, 2021. "Fast Calculation of Cube and Inverse Cube Roots Using a Magic Constant and Its Implementation on Microcontrollers," Energies, MDPI, vol. 14(4), pages 1-13, February.
  • Handle: RePEc:gam:jeners:v:14:y:2021:i:4:p:1058-:d:501066
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1996-1073/14/4/1058/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1996-1073/14/4/1058/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Moroz, Leonid V. & Walczyk, Cezary J. & Hrynchyshyn, Andriy & Holimath, Vijay & Cieśliński, Jan L., 2018. "Fast calculation of inverse square root with the use of magic constant – analytical approach," Applied Mathematics and Computation, Elsevier, vol. 316(C), pages 245-255.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.

      Corrections

      All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jeners:v:14:y:2021:i:4:p:1058-:d:501066. See general information about how to correct material in RePEc.

      If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

      If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

      If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

      For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

      Please note that corrections may take a couple of weeks to filter through the various RePEc services.

      IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.