How can i make my Get_Numb_of_Digits_in_a_number() function more accurate?
To get the number of whole numbers, you can just use log10.

int wholeNumbers = ( number == 0 ) ? 1 : (int)log10( abs( number ) ) + 1;


I implemented your function in C#. By using the decimal type for the calculation of the numbers after the decimal sign, precision issues are automatically solved. Most likely a simple for loop is more performant than using pow as in your solution. The result of numbers after the decimal sign for infinite precise numbers (like PI) is dependent on the precision of the type. With this code, I get 14 digits after comma for PI.

public static int AmountOfDigits( double number, DecimalPart decimalPart = DecimalPart.WholeNumbers )
{
    double absNumber = Math.Abs( number );
    int amountOfDigits = 0;

    // Amount of digits before decimal sign.
    if ( decimalPart == DecimalPart.WholeNumbers || decimalPart == DecimalPart.EntireDecimal )
    {
        amountOfDigits += (absNumber == 0) ? 1 : (int)Math.Log10( absNumber ) + 1;
    }

    // Amount of digits after decimal sign.
    if ( decimalPart == DecimalPart.AfterDecimalSign || decimalPart == DecimalPart.EntireDecimal )
    {
        // Use decimal for more precision!
        decimal afterDecimalSign = (decimal)absNumber;
        while ( afterDecimalSign - Math.Truncate( afterDecimalSign ) != 0 )
        {
            amountOfDigits++;
            afterDecimalSign *= 10;
        }
    }

    return amountOfDigits;
}


You do have to ask yourself where you will use this code however. When you are going to use it to calculate correct padding for string output, it's probably better to just convert the numbers to strings and count the amount of characters. It would be an interesting benchmarking test to compare that solution to this one.