Difference between revisions of "Pi"

From Lazarus wiki
Jump to navigationJump to search
(removed unsourced claim)
(more beautiful syntax highlighting)
Line 2: Line 2:
  
 
π (greek letter pi) is the ratio of the circumference of a circle to its diameter.
 
π (greek letter pi) is the ratio of the circumference of a circle to its diameter.
π is about <code>3.14159265358979</code>.
+
π is about <syntaxhighlight lang="pascal" enclose="none">3.14159265358979</syntaxhighlight>.
A full circle has <code>2*pi()</code> [[Radian|radians]].
+
A full circle has <syntaxhighlight lang="pascal" enclose="none">2*pi()</syntaxhighlight> [[Radian|radians]].
  
In [[Free Pascal]], <code>system.pi</code> is a [[Function|function]] which returns the value of π.
+
In [[Free Pascal]], <syntaxhighlight lang="pascal" enclose="none">system.pi</syntaxhighlight> is a [[Function|<syntaxhighlight lang="pascal" enclose="none">function</syntaxhighlight>]] which returns the value of π.
  
<code>pi()/4</code> is the same as <code>arctan(1)</code>.
+
<syntaxhighlight lang="pascal" enclose="none">pi()/4</syntaxhighlight> is the same as <syntaxhighlight lang="pascal" enclose="none">arctan(1)</syntaxhighlight>.
  
  
 
== See also ==
 
== See also ==
* {{Doc|package=RTL|unit=system|identifier=pi|text=<code>system.pi</code>}}
+
* {{Doc|package=RTL|unit=system|identifier=pi|text=<syntaxhighlight lang="pascal" enclose="none">system.pi</syntaxhighlight>}}
* {{Doc|package=RTL|unit=system|identifier=arctan|text=<code>system.arctan</code>}} calculates arc tangent.
+
* {{Doc|package=RTL|unit=system|identifier=arctan|text=<syntaxhighlight lang="pascal" enclose="none">system.arctan</syntaxhighlight>}} calculates arc tangent.

Revision as of 18:52, 11 February 2018

Deutsch (de) English (en) suomi (fi) français (fr) русский (ru) 中文(中国大陆)‎ (zh_CN)

π (greek letter pi) is the ratio of the circumference of a circle to its diameter. π is about 3.14159265358979. A full circle has 2*pi() radians.

In Free Pascal, system.pi is a function which returns the value of π.

pi()/4 is the same as arctan(1).


See also