Nyquist / XLISP 2.0  - 
Contents |
Tutorials |
Examples |
Reference
power
  | Type: | - | Lisp function (closure) | 
  | Source: | - | misc.lsp | 
Syntax
- (power x y)
- x, y - two integer or floating point numbers
 returns - x raised to the y power as a floating point number
 
In Nyquist, 'power' is implemented as a Lisp function:
(defun power (x y)
  (exp (* (log (float x)) y)))
Description
The 'power' function returns 'x' raised to the 'y' power as a floating
point number.
Examples
(power 2 8)   => 256
(power 4 .5)  => 2.0
See also expt.
  Back to Top
Nyquist / XLISP 2.0  - 
Contents |
Tutorials |
Examples |
Reference