功 能: 一个非负实数的平方根 函数原型: 在VC6.0中的math.h头文件的函数原型为double sqrt(double); 说明:sqrt系Square Root Calculations(平方根计算),通过这种运算可以考验CPU的浮点能力。
另外,计算平方根。
我可以检验它,因此如果这是其它计算的一部分我想知道,它能否找到一个完全平方根呢?
I can check it, so if this was part of some other computation, I want to know, did it find a perfect square or not?
假设我想在一大段代码中,计算很多次平方根。
Suppose I want to compute square roots a lot of places in a big chunk of code.
What is that? It's the piece of code we wrote for computing square roots, square roots of actually perfect squares.
对吧?这是什么呢?,这是我们写的计算平方根的代码,计算完全全平方根的。
All right, this is actually a very old piece of imperative knowledge for computing square roots, it's attributed to Heron of Alexandria, although I believe that the Babylonians are suspected of knowing it beforehand.
好,这是一个很古老的,关于计算平方根的程序性知识,是亚历山大的海伦提出的,不过我怀疑在那之前,巴比伦人就已经猜想过了。
Suppose I want to compute square roots a lot of places in a big chunk of code.
假设我想在一大段代码中,计算很多次平方根。
应用推荐