Where can I find software to approximate very large square roots?

129 Views Asked by At

I'm looking for an efficient tool that can help me approximate the square roots of large numbers to the nearest integer. (By large, I'm talking about numbers with several hundred digits.) Other than that, I don't really have any further constraints - it could be online or available as a download. Does anyone know where I could find one?

I've seen methods listed online, but those can get quite tedious after a while. I've also seen algorithms listed online, but I don't have the software needed to run the code and I don't want to spend money on it.

Thanks in advance!

3

There are 3 best solutions below

1
On BEST ANSWER

Try gnu bc.

It's a free, arbitrary precision calculator.

There are versions for various operating systems.

For a Windows version, here's a link:

http://gnuwin32.sourceforge.net/packages/bc.htm

3
On

Try this. http://www.azillionmonkeys.com/qed/sqroot.html

It's free and works fine.

2
On

If you have access to Maple, the built-in function isqrt does what you want.

Syntax:

y = isqrt(x)

x must be a nonnegative integer, but size is arbitrary (no limit)

y is the closest nonnegative integer to sqrt(x)

From Maple Help:

The isqrt function computes an integer approximation to the square root of x. The approximation is exact for perfect squares, and the error is less than 1 otherwise.

However Maple isn't free -- far from it, but if you have access rights to a university, you should be able to find a lab which has Maple.