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
    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


  • Hi Andrey,

    >>Also it would be great to return the remainder of Square Root.

    That's a good idea. You could send a feedback on uservoice site which is for suggestions and ideas.

    Best Regards,

    • Proposed as answer by DotNet Wang Friday, November 20, 2015 8:02 AM
    • Marked as answer by DotNet Wang Monday, November 23, 2015 8:21 AM
    Monday, November 16, 2015 2:35 AM