Log and LogE (Float functions): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (match syntax diagram to revised template; fix tags and some links; still some incomplete / unfound links)
Line 1: Line 1:
{{Template:Float:Log and LogE subtitle}}
{{Template:Float:Log and LogE subtitle}}


These [[Intrinsic classes|intrinsic]] functions return a number that is the natural [http://en.wikipedia.org/wiki/Logarithm logarithm]
The <var>Log</var> and <var>LogE</var> <var>[[Intrinsic classes|intrinsic]]</var> functions return a number that is the natural [http://en.wikipedia.org/wiki/Logarithm logarithm] (the logarithm base-''[http://en.wikipedia.org/wiki/E_%28mathematical_constant%29 e]'') of the method object value.
(the logarithm base-''[http://en.wikipedia.org/wiki/E_%28mathematical_constant%29 e]]'') of the method object value.


''LogE'' is a synonym for ''Log''.
<var>LogE</var> is a synonym for <var>Log</var>.


Available as of version 7.3 of the <var class=product>Sirius Mods</var>, the Log and LogE functions are
object-oriented versions of the $Log function.
==Syntax==
==Syntax==
{{Template:Float:Log syntax}}
{{Template:Float:Log syntax}}
Line 13: Line 10:
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%value </th>
<tr><th>%number </th>
<td>A numeric variable to receive the log of the method object. </td></tr>
<td>A numeric variable to receive the log of the method object. </td></tr>
<tr><th>number </th>
<tr><th>float</th>
<td>A Float value.</td></tr>
<td>A Float value.</td></tr>
</table>
</table>
==Usage notes==
==Usage notes==
*If ''number'' is not greater than zero, the request is cancelled.
<ul>
<li>If <var class="term">float</var> is not greater than zero, the request is cancelled.
<li><var>Log</var> / <var>LogE</var> are available as of <var class="product">[[Sirius Mods|"Sirius Mods"]]</var> Version 7.3.
</ul>
 
==Examples==
==Examples==
The following statement returns "''3.14159:log = 1.14472904118518''".
<ol>
    [[Intrinsic classes#printtext|printText]] {~} = {3.14159:log}
<li>The following statement returns "<code>3.14159:log = 1.14472904118518</code>".
<p class="code">printText {~} = {3.14159:log}</p>
</ol>


==See also==
==See also==
<ul>
<li><var>Log</var> / <var>LogE</var> are object-oriented versions of the <var>[[$Log]]</var> function.
<li><var>PrintText</var> is described in the <var>[[Intrinsic classes#printtext|"System Intrinsic Class"]]</var>.
</ul>
{{Template:Float:Log and LogE footer}}
{{Template:Float:Log and LogE footer}}

Revision as of 01:10, 4 February 2011

Natural log (base e) of a number (Float class)


The Log and LogE intrinsic functions return a number that is the natural logarithm (the logarithm base-e) of the method object value.

LogE is a synonym for Log.

Syntax

%number = float:Log

%number = float:LogE

Syntax terms

%number A numeric variable to receive the log of the method object.
float A Float value.

Usage notes

  • If float is not greater than zero, the request is cancelled.
  • Log / LogE are available as of "Sirius Mods" Version 7.3.

Examples

  1. The following statement returns "3.14159:log = 1.14472904118518".

    printText {~} = {3.14159:log}

See also