Re: RE: ftoa: Simple implementation
Hey Matt first of all thanks a lot for posting the above code. It works awesome.
I used it to display values over a touchscreen. The only problem is
decimals after 0.7 gets rounded off. eg: after 36.7 directly 37 is displayed , 36.8 and 36.9 are ignored. I guess the error is with this line :
//use switch to resolve the fractional part
switch (0x00000007 & (mantissa >> (20 - exponent)))
It would be great if you could help me fix this.