How to get the mantissa without float??
Posted: Mon Sep 22, 2014 1:44 am
Hi, I want to get the mantissa of a number.
The problem is this:
Example --> 50/1000 = 0.050 ---> with DIV ( / ) gives me "0" , and with MOD ( % ) gives me "50" ...
so the final number displayed in the LCD is 0.50 !!
I'm using float numbers and if statements , so I can compare the float and add zeros (ASCII) but float numbers are using most of the rom and ram
what can i do to get the mantissa "with the zeros"?
thanks!
The problem is this:
Example --> 50/1000 = 0.050 ---> with DIV ( / ) gives me "0" , and with MOD ( % ) gives me "50" ...
so the final number displayed in the LCD is 0.50 !!
I'm using float numbers and if statements , so I can compare the float and add zeros (ASCII) but float numbers are using most of the rom and ram
what can i do to get the mantissa "with the zeros"?
thanks!