Difference between revisions of "ApCoCoA:Fn.PowN"

From CoCoAWiki
(New page: <command> <title>Fn.PowN</title> <short_description>Returns <tt>Base</tt> to the power of <tt>Exponent</tt> with a given accuracy.</short_description> <syntax> Fn.PowN(Base:RAT,Exponen...)
(No difference)

Revision as of 15:17, 4 May 2011

Fn.PowN

Returns Base to the power of Exponent with a given accuracy.

Syntax

Fn.PowN(Base:RAT,Exponent:RAT,Acc:INT):RAT

Description

This function returns the value of Base to the power of Exponent.

rounded to the given accuracy Acc.

  • @param Base The base.

  • @param Exponent The exponent.

  • @param Acc The desired accuracy.

  • @return Returns Base^Exponent rounded to the given accuracy Acc.

Example

R := Fn.PowN(2,10,30);
Dec(R, 40);

1024
-------------------------------

Example

R := Fn.PowN(2,10/3,30);
Dec(R, 40);

10.079368399158985318137684858226
-------------------------------

ApCoCoA: Fn.Pow

ApCoCoA: Fn.SetAccuracy

ApCoCoA: Fn.GetAccuracy