Power()

From TinyMUX
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

FUNCTION: power(number, power)

Returns the result of raising number to the powerth power. number may not be negative. number and power may be floating point numbers, and a floating point result is returned.

Related Topics: exp(), ln(), log(), sqrt()

Examples

> say power(2,3)
You say "8"
> say power(9, 0.5)
You say "3"
> say power(100,pi())
You say "1919487.5835776979"
> say power(5, 0)
You say "1"
> say power(0, 0)
You say "1"
> say power(2,-3)
You say "0.125"
> say power(0,-1)
You say "+Inf"

(--Soylent 01:36, 3 December 2005 (EST))