It is hard to explain the question, i would like to convert a double number to integer without rounding the value after the decimal point. For example
double a = 123.456
I want to convert become
int b = 123456
I want to know how many digit there is, and move it back after calculated to become 123.456
PS:I just want pure mathematical method to solve this issue, without calculating the character of it.