Skip to content

BigNumber.Sqrt Method

Definition

Namespace: Corvus.Numerics
Assembly: Corvus.Text.Json.dll
Source: BigNumber.cs

Sqrt(BigNumber, int)

Computes the square root of a BigNumber using Newton's method.

public static BigNumber Sqrt(BigNumber value, int precision)

Parameters

Name Type Description
value BigNumber The value to find the square root of.
precision int The number of decimal places of precision.

Returns

BigNumber

The square root.

Exceptions

Exception Description
ArgumentException Thrown when value is negative.
ArgumentOutOfRangeException Thrown when precision is negative.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests.

Open an issue