none
Square root in BigInteger RRS feed

  • Question

  • Good day to you!
    BigInteger was presented in .NET 4, but it still has no Square Root function.
    Every calculator has it, but BigInteger has not.
    Math.sqrt returns double, that has only 15 decimal digits precision.

    I can use algorithms issued in Wikipedia
    https://en.wikipedia.org/wiki/Methods_of_computing_square_roots
    But these algorithms can be fasten using the inner implementation of BigInteger.
    So it would be better for Microsoft to include it in .NET.

    Also it would be great to return the remainder of Square Root.
    For example, SQRT(140)=11 and remainder 19.
    Digit-by-digit algorithm calculates remainder for free.

    By the way, please think about
    - function CubeRoot
    - property IsSquare

    Thanks in advance.

    Sunday, November 15, 2015 4:02 PM

Answers