I tried to avoid the commonly used top-down approach (use log10 to find the most significant digit) to allow for larger user-defined data types. Can anyone see the problem with it?
I'd rather not. I'd rather keep the dependencies down to a minimum. Plus, stringstream doesn't support user-defined number types unless they overload the << >> operators, does it?
So would you suggest that I use math.h's floor function and make floor functions for the integer types? Or is there an easy algorithm to floor any number type?
Also on note of machine precision, how should I fix it?