I tend to use “HP” style decimal floating point types if accuracy is required. The mantissa is stored as one base 10 digit per 4 bits (BCD encoded). A 64 bit int gives 12 digits of precision and 3 digit mantissa plus flags. This can be scaled to 128 bits if needed easily.
I spent several years maintaining a C library that handled these for some embedded instrumentation. This included most key mathematical functions as well. Most interesting thing I ever had to look after.