When discussing decimal math in assembly language within the framework of IEEE standards, it is vital to distinguish between standard binary floating-point (float and double) and true IEEE 754 Decimal Floating-Point (DFP).
In the RISC-V Instruction Set Architecture (ISA), support for IEEE 754 Decimal Floating-Point (DFP) is reserved under the "L" standard extension. Unlike the binary floating-point extensions—such as F (single precision), D (double precision), and Q (quad precision)—the L extension has a unique architectural status.
To print a floating-point number in the RARS (RISC-V Assembler and Runtime System) simulator, use system call (ecall) service 2 for a 32-bit single-precision float or service 3 for a 64-bit double-precision float, placing the value into argument register fa0. (Place the system Service code in a0.)
RISC-V single-precision floating-point values follow the IEEE 754 binary32 standard, providing a normalized numeric range roughly from 1.18E-38 to 3.40E38 (positive and negative). (Decimal Precision is approximately 7.22 significant digits.)
RISC-V double-precision floating-point values follow the IEEE 754 binary64 standard, providing a normalized numeric from approximately 4.94E-324 to 1.79E308. (Decimal precision is approximately 15 to 17 significant digits.)
Notes:
IEEE 754 Standard for Floating Point Binary Arithmetic (YouTube)
Floating Point Numbers (YouTube)