I would like to know the logic to separate the numbers next to '.' in a float value.
for example :
float a=20.154;
float b=158.75885;
float c,d;
c=a%1;
d=b%1;
System.out.println(c); // value in c will be 0.15399999999999991
System.out.println(d); // value in d will be 0.7588499999999954
but want the value of c as just 0.154 or 154 and value of d as 0.75885 or 75885
Thanks in advance
