"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > How can double-precision arithmetic be emulated using single-precision floats in embedded hardware systems with limited precision?

How can double-precision arithmetic be emulated using single-precision floats in embedded hardware systems with limited precision?

Posted on 2025-02-26
Browse:273

How can double-precision arithmetic be emulated using single-precision floats in embedded hardware systems with limited precision?

Emulating Double-Precision Arithmetic with Float Pairs

Question:

An embedded hardware system with limited floating-point precision requires the emulation of double-precision arithmetic using single-precision floats. Specifically, a 64-bit double-precision addition and comparison are needed.

Addition:

The addition process raises complexities in determining the base and carry detection mechanism. What approach should be used, and how can the carry be handled?

Comparison:

The comparison operation can be implemented using lexicographic ordering.

Background:

The objective is to obtain additional significant digits rather than extending the exponent range.

Answer:

Double-Float Emulation

Double-float or float-float is a technique that utilizes pairs of single-precision numbers to simulate double-precision precision. While this provides enhanced precision, it comes at the expense of reduced exponent range.

Recommended Resources

For further guidance on double-float emulation, refer to these technical papers:

  • [Implementation of float-float operators on graphics hardware](https://hal.archives-ouvertes.fr/hal-00021443)
  • [Extended-Precision Floating-Point Numbers for GPU Computation](http://andrewthall.org/papers/df64_qf128.pdf)

These papers provide insights into adapting float-float techniques to various platforms, including embedded systems.

Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3