Difference between revisions of "ApCoCoA:Fn.Log"

From CoCoAWiki
(New page: <command> <title>Fn.Log</title> <short_description>Returns the logarithm to a given base.</short_description> <syntax> Fn.Log(Base:RAT,X:RAT):RAT </syntax> <description> This function ...)
(No difference)

Revision as of 15:33, 4 May 2011

Fn.Log

Returns the logarithm to a given base.

Syntax

Fn.Log(Base:RAT,X:RAT):RAT

Description

This function returns the logarithm of X to the base Base rounded to the current global accuracy.

  • @param Base The base to which to compute the logarithm.

  • @param X The value of which to compute the logarithm.

  • @return The logarithm of X to the base Base rounded to the current global accuracy.

Example

Fn.SetAccuracy(20);
R := Fn.Log(3,27);
Dec(R, 40);

3
-------------------------------

Example

Fn.SetAccuracy(20);
R := Fn.Log(2,10);
Dec(R, 40);

3.32192809488736234787
-------------------------------

ApCoCoA: Fn.LogN

ApCoCoA: Fn.Ln

ApCoCoA: Fn.LnN

ApCoCoA: Fn.SetAccuracy

ApCoCoA: Fn.GetAccuracy