Difference between revisions of "ApCoCoA:Fn.Sqrt"

From CoCoAWiki
(New page: <command> <title>Fn.Sqrt</title> <short_description>Returns the square root of a given value.</short_description> <syntax> Fn.Sqrt(X:RAT):RAT </syntax> <description> This function retu...)
(No difference)

Revision as of 14:38, 4 May 2011

Fn.Sqrt

Returns the square root of a given value.

Syntax

Fn.Sqrt(X:RAT):RAT

Description

This function returns the square root of X rounded to the

current global accuracy.

  • @param X The value of which to take the square root.

  • @return Returns the square root of X rounded to the current global accuracy.

Example

Fn.SetAccuracy(20);
R := Fn.Sqrt(2);
Dec(R, 30);

1.4142135623730950488
-------------------------------

ApCoCoA: Fn.SqrtN

ApCoCoA: Fn.Root

ApCoCoA: Fn.RootN

ApCoCoA: Fn.SetAccuracy

ApCoCoA: Fn.GetAccuracy