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



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

arccos

Return inverse cosine

Declaration

Source position: math.pp line 270

function arccos(

  x: float

):float;

Description

Arccos returns the inverse cosine of its argument x. The argument x should lie between -1 and 1 (borders included).

Errors

If the argument x is not in the allowed range, an EInvalidArgument exception is raised.

See also

arcsin

  

Return inverse sine

arcosh

  

Return inverse hyperbolic cosine

arsinh

  

Return inverse hyperbolic sine

artanh

  

Return inverse hyperbolic tangent

Example

Program Example1;

{ Program to demonstrate the arccos function. }

Uses math;

  Procedure WriteRadDeg(X : float);

  begin
    Writeln(X:8:5,' rad = ',radtodeg(x):8:5,' degrees.')
  end;

begin
  WriteRadDeg (arccos(1));
  WriteRadDeg (arccos(sqrt(3)/2));
  WriteRadDeg (arccos(sqrt(2)/2));
  WriteRadDeg (arccos(1/2));
  WriteRadDeg (arccos(0));
  WriteRadDeg (arccos(-1));
end.

Notes

 No notes exist for this page yet. 





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