|
I have a way:
000 .... 1
000 ... 01
.
.
.
1000000
Perform a bitwise AND operation with a floating point number. When you get zero, you will reach the highest bit, and you can know the number of digits. I do n’t know if it works. It seems more troublesome. I wonder if there is any function that directly returns the number of digits? |
|