Next Article in Journal
FracLogGPT: A Multimodal Large Language Model for Fracture Interpretation in Imaging Logging
Previous Article in Journal
An Improved Single-Stage Object Detection Model and Its Application to Oil Seal Defect Detection
Previous Article in Special Issue
A Novel and Highly Versatile Voltage Monitoring Circuit Enabling Power Consumption and Area Minimization
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Article

Efficient n-th Root Computation on Microcontrollers Employing Magic Constants and Modified Newton and Householder Methods

by
Cezary J. Walczyk
,
Maciej Jurgielewicz
and
Jan L. Cieśliński
*
Wydział Fizyki, Uniwersytet w Białymstoku, ul. Ciołkowskiego 1L, 15-245 Białystok, Poland
*
Author to whom correspondence should be addressed.
Electronics 2026, 15(1), 129; https://doi.org/10.3390/electronics15010129 (registering DOI)
Submission received: 19 November 2025 / Revised: 17 December 2025 / Accepted: 23 December 2025 / Published: 26 December 2025

Abstract

With the growing number of applications in embedded systems—such as IoT modules, smart sensors, and wearable devices—there is an increasing demand for fast and accurate computations on resource-constrained platforms. In this paper, we present a new method for computing n-th roots in floating-point arithmetic based on an initial estimate generated by a “magic constant,” followed by one or two iterations of a modified Newton–Raphson or Householder algorithm. For cubic and quartic roots, we provide C implementations operating in single-precision floating-point format. The proposed algorithms are evaluated in terms of maximum relative error and execution time on selected microcontrollers. They exhibit high accuracy and noticeably reduced computation time. For example, our methods for computing cubic roots outperform the standard library function cbrtf() in both speed and precision. The results may be useful in a variety of fields, including biomedical and biophysical applications, statistical analysis, and real-time image and signal processing.
Keywords: embedded systems; floating-point arithmetic; piece-wise linear approximation; magic constants; cube root (cbrt); quartic root; ESP32; STM32 embedded systems; floating-point arithmetic; piece-wise linear approximation; magic constants; cube root (cbrt); quartic root; ESP32; STM32

Share and Cite

MDPI and ACS Style

Walczyk, C.J.; Jurgielewicz, M.; Cieśliński, J.L. Efficient n-th Root Computation on Microcontrollers Employing Magic Constants and Modified Newton and Householder Methods. Electronics 2026, 15, 129. https://doi.org/10.3390/electronics15010129

AMA Style

Walczyk CJ, Jurgielewicz M, Cieśliński JL. Efficient n-th Root Computation on Microcontrollers Employing Magic Constants and Modified Newton and Householder Methods. Electronics. 2026; 15(1):129. https://doi.org/10.3390/electronics15010129

Chicago/Turabian Style

Walczyk, Cezary J., Maciej Jurgielewicz, and Jan L. Cieśliński. 2026. "Efficient n-th Root Computation on Microcontrollers Employing Magic Constants and Modified Newton and Householder Methods" Electronics 15, no. 1: 129. https://doi.org/10.3390/electronics15010129

APA Style

Walczyk, C. J., Jurgielewicz, M., & Cieśliński, J. L. (2026). Efficient n-th Root Computation on Microcontrollers Employing Magic Constants and Modified Newton and Householder Methods. Electronics, 15(1), 129. https://doi.org/10.3390/electronics15010129

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop