Difference between revisions of "SHIP:Sail:sqrt"

From Serious Documentation
Jump to: navigation, search
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
{{SailFuncTableStart|}}<onlyinclude>
 
{{SailFuncTableStart|}}<onlyinclude>
|{{SailFunc|sqrt}}||{{DataType|Float}}||style="text-align:center;"|v5.1.0||Return &radic;number</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 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]]
 
[[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...