This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Just like integer division, these functions round down to an integer. | |
Running this program should produce the following output: | |
sqrt(3735928559) == 61122 | |
61122^2 == 3735898884 | |
sqrt(244837814094590) == 15647294 | |
15647294^2 == 244837809522436 | |
This algorithm comes from Jack W. Crenshaw's 1998 article in Embedded: |