Log10: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
Created page with "LOG10(''number'') '''Description''' LOG10 returns the base-10 logarithm of a number. The required parameter, ''number'', is any numeric expression. '''Example''' <pre> RE..."
 
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
LOG10(''number'')
''This function is for BASIC compatibility. It is not available in pure JavaScript projects.''  


'''Description'''
Log10(''number'')


LOG10 returns the base-10 logarithm of a number. The required parameter, ''number'', is any numeric expression.
== Description ==


'''Example'''
Log10 returns the base-10 logarithm of a number. The required parameter, ''number'', is any numeric expression.
 
== Example (Basic) ==


<pre>
<pre>
REM LOG10 Example
Rem Log10 Example
'LOG10 calculates natural logarithms
'Log10 calculates natural logarithms
DIM e
Dim e
e = 2.718282
e = 2.718282
PRINT "LOG10(20) = " & LOG10(20)
Print "Log10(20) = " & Log10(20)
PRINT "LOG10(25) = " & LOG10(25)
Print "Log10(25) = " & Log10(25)
PRINT "LOG10(100) = " & LogN(10, 2)
Print "Log10(100) = " & LogN(10, 100)
 
Function LogN(Base, Number)
  LogN = LOG(Number) / LOG(Base)
End Function
</pre>
</pre>


'''Output'''
== Output ==


<pre>
<pre>
LOG10(20) = 1.301029996
Log10(20) = 1.301029996
LOG10(25) = 1.397940009
Log10(25) = 1.397940009
LOG10(100) = 2
Log10(100) = 2
</pre>
</pre>


'''Related Items'''
== Related Items ==
 
[[exp|Exp]], [[log|Log]]
 
[[Category:Language Reference]]
 
[[Category:Math]]


[[exp|EXP]], [[log|LOG]]
[[Category:BASIC Functions]]

Latest revision as of 15:30, 25 March 2019

This function is for BASIC compatibility. It is not available in pure JavaScript projects.

Log10(number)

Description

Log10 returns the base-10 logarithm of a number. The required parameter, number, is any numeric expression.

Example (Basic)

Rem Log10 Example
'Log10 calculates natural logarithms
Dim e
e = 2.718282
Print "Log10(20) = " & Log10(20)
Print "Log10(25) = " & Log10(25)
Print "Log10(100) = " & LogN(10, 100)

Function LogN(Base, Number)
  LogN = LOG(Number) / LOG(Base)
End Function

Output

Log10(20) = 1.301029996
Log10(25) = 1.397940009
Log10(100) = 2

Related Items

Exp, Log