For the particular problem, computing the square root, you can use Decimal type and Newton's algorithm:
using System;
class Program
{
public static void Main()
{
long x = 4746073226998689451;
decimal sqrt_x = (decimal)Math.Sqrt(x);
for (int i = 0; i < 10; ++i)
sqrt_x = 0.5m * (sqrt_x + x / sqrt_x);
Console.WriteLine("{0:F16}", sqrt_x);
}
}
The result is:
2178548421.9999998547197773
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…