help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'System' (#rtl)

sqrt

Calculate the square root of a value

Declaration

Source position: mathh.inc line 62

function sqrt(

  d: ValReal

):ValReal;

Description

Sqrt returns the square root of its argument X, which must be positive.

Errors

If X is negative, then a run-time error is generated.

See also

Sqr

  

Calculate the square of a value.

Ln

  

Calculate logarithm

Exp

  

Exponentiate

Example

Program Example66;

{ Program to demonstrate the Sqrt function. }

begin
  Writeln (Sqrt(4):0:3); { Prints 2.000 }
  Writeln (Sqrt(2):0:3); { Prints 1.414 }
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505