Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - sqrt() return the square root of a positive number http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 sqrt()              Return the square root of a positive number
------------------------------------------------------------------------------
 Declaration
   math.hdr

 Syntax
   function dbl sqrt extern
   param const dbl eNumber


 Arguments
   eNumber is a positive numeric for which the square root is to be computed.

 Return
   The square root of the passed number.

 Description
   The sqrt() function returns the square root of the passed positive
   number. The function requires the presence of a numeric coprocessor,
   without which it always returns zero.

 Example
   #define EXAMPLE_MATH
   #include example.hdr

   proc Test_sqrt
   vardef
      uint n
      dbl  eNum
   enddef
   for n := 1 to 10
      eNum := n**2
      ? n, eNum, sqrt( eNum )
   next
   endproc

   proc main
   Test_sqrt()
   endproc

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson