32-bit double-precision float-to-string

A forum for ARM assembly programmers (32 & 64 bit)
Post Reply
rhyde
Site Admin
Posts: 51
Joined: Sun Dec 04, 2022 5:36 pm

32-bit double-precision float-to-string

Post 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
Attachments
Listing10-3.zip
(108.75 KiB) Downloaded 110 times
Post Reply