Log2 (Float function): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
mNo edit summary |
||
(8 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{Template:Float:Log2 subtitle}} | {{Template:Float:Log2 subtitle}} | ||
The $<var>Log2</var> [[Intrinsic classes|intrinsic]] function returns a number that is the [http://en.wikipedia.org/wiki/Logarithm logarithm] base-2 of the method object value. | |||
of the method object value. | |||
==Syntax== | ==Syntax== | ||
{{Template:Float:Log2 syntax}} | {{Template:Float:Log2 syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>% | <tr><th>%number</th> | ||
<td>A numeric variable to receive the base-2 log of the method object. </td></tr> | <td>A numeric variable to receive the base-2 log of the method object. </td></tr> | ||
<tr><th> | |||
<td> | <tr><th>float</th> | ||
<td>The input method object <var>Float</var> value.</td></tr> | |||
</table> | </table> | ||
==Usage notes== | ==Usage notes== | ||
<ul> | |||
<li>If <var class="term">float</var> is less than or equal to zero, the request is cancelled. | |||
<li><var>Log2</var> is available as of <var class="product">Sirius Mods</var> Version 7.3. | |||
</ul> | |||
==Examples== | ==Examples== | ||
The following statement returns | The following statement returns <code>3.14159:log2 = 1.65149491087943</code>: | ||
<p class="code">[[ | <p class="code">[[PrintText statement|printText]] {~} = {3.14159:log2} | ||
</p> | |||
==See also== | ==See also== | ||
<ul> | |||
<li><var>Log2</var> function is an object-oriented version of the <var>[[$Log2]]</var> function. | |||
</ul> | |||
{{Template:Float:Log2 footer}} | {{Template:Float:Log2 footer}} | ||
Latest revision as of 17:57, 2 November 2012
Log base 2 of a number (Float class)
The $Log2 intrinsic function returns a number that is the logarithm base-2 of the method object value.
Syntax
%number = float:Log2
Syntax terms
%number | A numeric variable to receive the base-2 log of the method object. |
---|---|
float | The input method object Float value. |
Usage notes
- If float is less than or equal to zero, the request is cancelled.
- Log2 is available as of Sirius Mods Version 7.3.
Examples
The following statement returns 3.14159:log2 = 1.65149491087943
:
printText {~} = {3.14159:log2}
See also
- Log2 function is an object-oriented version of the $Log2 function.