Difference between revisions of "SHIP:Sail:sqrt"

From Serious Documentation
Jump to: navigation, search
(Created page with "__NOTOC__ {{SailFuncTableStart|}}<onlyinclude> |{{SailFunc|sqrt}}||{{DataType|Float}}||style="text-align:center;"|v5.1.0||Return √number{{v5}}</onlyinclude> |} == See Al...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
{{SailFuncTableStart|}}<onlyinclude>
 
{{SailFuncTableStart|}}<onlyinclude>
|{{SailFunc|sqrt}}||{{DataType|Float}}||style="text-align:center;"|v5.1.0||Return &radic;number{{v5}}</onlyinclude>
+
|{{SailFunc|sqrt}}||{{DataType|Float}}||style="text-align:center;"|v5.1.0||Calculates the square root of a number (&radic;n)</onlyinclude>
 
|}
 
|}
 
== See Also: ==
 
== See Also: ==
Line 7: Line 7:
 
*[[SHIP:Sail:Functions|Sail Functions]]
 
*[[SHIP:Sail:Functions|Sail Functions]]
 
*[[SHIP:Sail:Numeric Functions|Sail Numeric Functions]]
 
*[[SHIP:Sail:Numeric Functions|Sail Numeric Functions]]
*{{SailFunc|abs}}, {{SailFunc|ceil}}, {{SailFunc|floor}}, {{SailFunc|ftoi}}, {{SailFunc|itof}}, {{SailFunc|max}}, {{SailFunc|min}}
+
*{{SailFunc|abs}}, {{SailFunc|exp}}, {{SailFunc|log}}
 
== Prototype ==
 
== Prototype ==
 
<code>{{DataType|Float}} {{SailFunc|sqrt}}({{DataType|Float}} n);</code>
 
<code>{{DataType|Float}} {{SailFunc|sqrt}}({{DataType|Float}} n);</code>
Line 26: Line 26:
 
== Detailed Description ==
 
== Detailed Description ==
  
The <code>{{SailFunc|sqrt}}()</code> function returns the square root of the given number.
+
The <code>{{SailFunc|sqrt}}()</code> function returns the square root of the given number (&radic;n).
  
 
== Examples ==
 
== Examples ==
Line 34: Line 34:
 
! scope="col" style="text-align:left" | Notes
 
! scope="col" style="text-align:left" | Notes
 
|-
 
|-
|<code>{{SailFunc|sqrt}}(1);</code> || 1.000000... ||
+
|<code>{{SailFunc|sqrt}}(121);</code> || 11.000000... ||
 
|-
 
|-
|<code>{{SailFunc|sqrt}}(27);</code> || 5.186152... ||
+
|<code>{{SailFunc|sqrt}}(500);</code> || 22.360679... ||
|-
 
|<code>{{SailFunc|sqrt}}(100);</code> || 10.000000... ||
 
 
|}
 
|}
 +
 +
[[Category:Numeric Functions]]

Latest revision as of 11:19, 14 October 2016

Function Returns Introduced Description
sqrt Float v5.1.0 Calculates the square root of a number (√n)

See Also:

Prototype

Float sqrt(Float n);

Parameters/Return Value

Parameter Data Type Description
n Float the number to take the square root of
Return Float the result of √n

Detailed Description

The sqrt() function returns the square root of the given number (√n).

Examples

Example Result Notes
sqrt(121); 11.000000...
sqrt(500); 22.360679...