Difference between revisions of "Extensions.Math.Log"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:'''Log '''}}[[Category:Math]]
 
{{DISPLAYTITLE:'''Log '''}}[[Category:Math]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | Log | Logarithm of a given number to a given base | [[Term]] | [[Extensions.Math|OTX Math Extension]] | - | - | - | Yes}}
+
{{ClassificationActivity | Log | Calculates the logarithm of a given number to a given base| [[Term]] | [[Extensions.Math|OTX Math Extension]] | - | - | - | Yes}}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
Line 9: Line 9:
  
 
== Description ==
 
== Description ==
The '''Log''' term is used for the calculation of the logarithm of a given number on a given base.
+
The '''Log''' term is used for calculating the logarithm of a given number to a given base.
  
 
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Float|Float]] | Result of the calculation of the logarithm of a number.}}
 
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Float|Float]] | Result of the calculation of the logarithm of a number.}}
Line 16: Line 16:
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| Numeral | - | [[Term]] | - | [1] | The numerical value (of type Integer or Float), where the logarithm is calculated..}}
+
{{TableRowPropertie1| Numeral | [[Numeric]] | [[Term]] | - | [1] | Represents the numeric value on which the logarithm shall be calculated. If the value is [[Core.DataTypes.SimpleDataType.Integer|'''Integer''']], it shall be automatically promoted to [[Core.DataTypes.SimpleDataType.Float|'''Float''']].}}
{{TableRowPropertie2| Base | - | [[Term]] | - | [1] | The numerical value (of type Integer or Float), which will serve as the logarithmic basis of the calculation.}}
+
{{TableRowPropertie2| Base | [[Numeric]] | [[Term]] | - | [1] | The numerical value (of type Integer or Float), which will serve as the logarithmic basis of the calculation. If the value is [[Core.DataTypes.SimpleDataType.Integer|'''Integer''']], it shall be automatically promoted to [[Core.DataTypes.SimpleDataType.Float|'''Float''']].}}
 
|}
 
|}
  
Line 24: Line 24:
 
Float Float1;
 
Float Float1;
  
Float1 = Math.Log(2, 4);
+
/// Flow
 +
 
 +
Float1 = Math.Log(4, 2);
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 07:15, 1 October 2018

Classification

Name Log
Short Description Calculates the logarithm of a given number to a given base
Class Term
Extension OTX Math Extension
Group -
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

FloatTerm = Math.Log(NumericTerm, NumericTerm);

Description

The Log term is used for calculating the logarithm of a given number to a given base.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Float Result of the calculation of the logarithm of a number.

Properties

Name Data Type Class Default Cardinality Description
Numeral Numeric Term - [1] Represents the numeric value on which the logarithm shall be calculated. If the value is Integer, it shall be automatically promoted to Float.
Base Numeric Term - [1] The numerical value (of type Integer or Float), which will serve as the logarithmic basis of the calculation. If the value is Integer, it shall be automatically promoted to Float.

OTL Examples

Float Float1;

/// Flow

Float1 = Math.Log(4, 2);

See also

Power
Ln
Sin
Cos
Tan