P
Peter Sprenger
Hello,
I want to efficient convert floating point numbers (IEEE754) into a
string. I have no library routines that do the job (like sprintf etc.),
because I work in an embedded environment.
My actual algorithm uses multiplying with 10 to shift the fraction into
an integer value and to aquire the used exponent. But the drawback is
obvious: When I have very small numbers like 3.141E-300 I have to make
300 time consuming floating point multiplies to convert this number.
But, since I know the IEEE754 structure and have directly access to the
exponent (of base 2) of a fp number, is there a faster method to convert
fp numbers to ASCII?
Regards
Peter
I want to efficient convert floating point numbers (IEEE754) into a
string. I have no library routines that do the job (like sprintf etc.),
because I work in an embedded environment.
My actual algorithm uses multiplying with 10 to shift the fraction into
an integer value and to aquire the used exponent. But the drawback is
obvious: When I have very small numbers like 3.141E-300 I have to make
300 time consuming floating point multiplies to convert this number.
But, since I know the IEEE754 structure and have directly access to the
exponent (of base 2) of a fp number, is there a faster method to convert
fp numbers to ASCII?
Regards
Peter