Page 1 of 1

32-bit double-precision float-to-string

Posted: Tue May 14, 2024 4:29 pm
by rhyde
Here is a sample program (from "The Art of ARM Assembly, Volume 2") that converts a 64-bit double-precision floating-point value to a string. This code was created and tested on a Pi 400 using a 32-bit version of PiOS. It easily ports to Cortex-M7F CPUs (e.g., the Teensy 4.x) and other 32-bit based ARM systems running Linux.

This conversion has been written to improve performance. To that end it uses large lookup tables for various floating-point operations and mantissa-to-string conversions.

Enjoy,
Randy Hyde