System and method for conversion of numeric values between different number base formats, for use with software applications

Described herein are systems and methods for conversion of numeric values between different number base formats, for use with software applications. In accordance with an embodiment, an integral part of a passed floating-point numeric value in a source number base (e.g., binary) format is isolated a...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Lagneau Olivier, Darcy Joseph
Format: Patent
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:Described herein are systems and methods for conversion of numeric values between different number base formats, for use with software applications. In accordance with an embodiment, an integral part of a passed floating-point numeric value in a source number base (e.g., binary) format is isolated and converted to an integer. A fractional part of the numeric value is also isolated and converted to an integer, while limiting the isolation and conversion of the fractional part to a required precision or number of digits, depending on the particular requirements of a software application. The fractional part can be rounded, including determining an exact roundoff as appropriate, and if necessary propagating the rounding to the integral part. Digits from the resulting integers representing the integral and fractional parts can then be collected and used to prepare a representation of the original numeric value in a target number base (e.g., decimal) format.