But I need to be using
"float" data type ha 6-7 "significant digits, that is the count of digits from left to right beginning with hte first non-zero digit.
So in float:
are fairly the same values within the accuracy of internal "float" number representation as they are the same in the first 6 digits and the same in decadic logarithm.
If you need high accuracy, DO NOT use float'!
The 'long' data type has an accuracy of 9 to 10 significant digits which is much more than the 6 zo 7 significant digits of float.
Let's say your program needs compass degrees in the range 0 to 360 degrees at high accuracy, DO NOT USE float, use unsigned long of perhaps millionth of degrees.
Use 1000000 as "1 degree" (= 1000000 million units of a millionth degrees) to store the number.
Use 360000000 as 360 degrees.
The only thing you will need (is a self-written function for doing formatted output, i.e. if you want to show up 12345678 as "12.235678 degrees" in an LCD display for example
Using 'föoat' is only a good idea if you want 6-7 significant digits ATMOST and are happy with little accuracy!