Exemple #1
0
 private static BigDecimal GetInitialApproximation(BigDecimal n)
 {
     BigInteger integerPart = n.toBigInteger();
     int length = integerPart.ToString().Length;
     if((length % 2) == 0) {
         length--;
     }
     length /= 2;
     BigDecimal guess = ONE.movePointRight(length);
     return guess;
 }