lojix/power_model/src/main/com/thesett/aima/attribute/time/BitHackUtils.java
public static int getCharacterCountInt64(long value)
    {
        if (value >= 0)
        {
            return getCharacterCountUInt64(value);
        }
        else if (value == Long.MIN_VALUE)
        {
            return getCharacterCountUInt64(Long.MAX_VALUE) + 1;
        }
        else
        {
            return getCharacterCountUInt64(-value) + 1;
        }
    }
public static int getCharacterCountInt64(long value)
    {
        if (value >= 0)
        {
            return getCharacterCountUInt64(value);
        }
        else if (value == Long.MIN_VALUE)
        {
            return getCharacterCountUInt64(Long.MAX_VALUE) + 1;
        }
        else
        {
            return getCharacterCountUInt64(-value) + 1;
        }
    }
public static int getCharacterCountInt64 ( long value ) { if ( value >= 0 ) { return getCharacterCountUInt64 ( value ) ; } else if ( value == Long . MIN_VALUE ) { return getCharacterCountUInt64 ( Long . MAX_VALUE ) + 1 ; } else { return getCharacterCountUInt64 ( - value ) + 1 ; } }
Calculates the number of ASCII characters that will be needed to represent a specifed signed 64-bit integer.

@param  value The value to get the character count for.

@return The number of ASCII character need to represent an signed 64-bit integer.
Calculates the number of ASCII characters that will be needed to represent a specifed signed 64 - bit integer .