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 - power() compute value of numeric raised to specified power http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 power()             Compute value of numeric raised to specified power
------------------------------------------------------------------------------
 Declaration
   math.hdr

 Syntax
   function dbl power extern
   param value dbl eNumber, ;
         value dbl eExponent

 Arguments
   eNumber is a numeric expression.
   eExponent is a numeric to use as the exponent.

 Return
   The result of raising eNumber to the power of eExponent.

 Description
   The power() function calculates the result of raising eNumber to the
   power of eExponent.

 Example
   #define EXAMPLE_MATH
   #include example.hdr

   proc Test_power
   ? 10**3               // prints 1000
   ? power( 10, 3 )      // prints 1000
   setfixed( .t. )
   setdecimals( 12 )
   ? 2 ** -3             // prints 0
   ? 2 ** -3.0           // prints 0.125000000
   ? power( 2, -3 )      // prints 0.125000000
   endproc

   proc main
   Test_power()
   endproc

See Also: **

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