Direct Base-to-Base Conversion Algorithm: Integer and Fractional Parts with Array-Based Arithmetic

This paper introduces a direct, precise base-to-base conversion algorithm for numbersin arbitrary bases from 2 to 62, eliminating the need for intermediate decimal conversions.Unlike traditional approaches which convert through base 10 and suffer from floating-pointrounding errors, our method employs array-based big integer arithmetic to maintain exactprecision for both integer and fractional parts simultaneously. The algorithm processesdigits from the source base one by one with inline normalization to the target base,avoiding floating-point operations altogether. We provide formal pseudocode for bothinteger and fractional parts, complexity analyses, and practical guidance for safedata-type selection. The integer conversion runs in O(n · m) time and fractional conversion in O(d · p),where n, m represent the count of source and target integer digits and d, p the sourcefractional digits and desired fractional precision. An open-source C++ implementationis available on GitHub. This approach enables exact, efficient conversions suitablefor high-precision and arbitrarily large numeric data in modern computational applications.

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2025-12-02
DOI
https://doi.org/10.5281/zenodo.17790079
Primary Topic
Numerical Methods and Algorithms
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Direct Base-to-Base Conversion Algorithm: Integer and Fractional Parts with Array-Based Arithmetic

Zenodo (CERN European Organization for Nuclear Research)
Numerical Methods and Algorithms
article

Direct Base-to-Base Conversion Algorithm: Integer and Fractional Parts with Array-Based Arithmetic

article en

Abstract

This paper introduces a direct, precise base-to-base conversion algorithm for numbersin arbitrary bases from 2 to 62, eliminating the need for intermediate decimal conversions.Unlike traditional approaches which convert through base 10 and suffer from floating-pointrounding errors, our method employs array-based big integer arithmetic to maintain exactprecision for both integer and fractional parts simultaneously. The algorithm processesdigits from the source base one by one with inline normalization to the target base,avoiding floating-point operations altogether. We provide formal pseudocode for bothinteger and fractional parts, complexity analyses, and practical guidance for safedata-type selection. The integer conversion runs in O(n · m) time and fractional conversion in O(d · p),where n, m represent the count of source and target integer digits and d, p the sourcefractional digits and desired fractional precision. An open-source C++ implementationis available on GitHub. This approach enables exact, efficient conversions suitablefor high-precision and arbitrarily large numeric data in modern computational applications.

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 35%
Numerical Methods and Algorithms
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Direct Base-to-Base Conversion Algorithm: Integer and Fractional Parts with Array-Based Arithmetic · Zenodo (CERN European Organization for Nuclear Research) (2025) | TGRS Research Map | TGRS