Difference between revisions of "TI-BASIC:Log"

From Learn @ Cemetech
Jump to navigationJump to search
(Initial automated import)
 
 
Line 15: Line 15:
  
 
Using either the [[TI-BASIC:Ln|Ln(]] or the log( command, logarithms of any base can be calculated, using the identity:
 
Using either the [[TI-BASIC:Ln|Ln(]] or the log( command, logarithms of any base can be calculated, using the identity:
[[TI-BASIC:Math|Math]]
+
<math>
 
\log_b{x} = \frac{\ln{x}}{\ln{b}} = \frac{\log{x}}{\log{b}}  
 
\log_b{x} = \frac{\ln{x}}{\ln{b}} = \frac{\log{x}}{\log{b}}  
[[TI-BASIC:/math|/math]]
+
</math>
  
 
So, to take the base B log of a number X, you could use either of the following equivalent ways:
 
So, to take the base B log of a number X, you could use either of the following equivalent ways:
Line 44: Line 44:
 
* [[TI-BASIC:Ten_Exponent|10^(]]
 
* [[TI-BASIC:Ten_Exponent|10^(]]
 
* [[TI-BASIC:Ln|Ln(]]
 
* [[TI-BASIC:Ln|Ln(]]
* [[TI-BASIC:Logbase|logBASE(]][[Category:TI-BASIC]]
+
* [[TI-BASIC:Logbase|logBASE(]]
 +
[[Category:TI-BASIC]]
 
[[Category:TIBD]]
 
[[Category:TIBD]]

Latest revision as of 19:17, 24 February 2016

LOG.GIF

Command Summary

Computes the (principal branch of the) base 10 logarithm.

Command Syntax

log(value)

Menu Location

Press the LOG key to paste log(.

Calculator Compatibility

TI-83/84/+/SE

Token Size

1 byte

The log( command computes the base 10 logarithm of a value -- the exponent to which 10 must be raised, to get that value. This makes it the inverse of the 10^( command.

log( is a real number for all positive real values. For negative numbers, log( is an imaginary number (so taking log( of a negative number will cause ERR:NONREAL ANS to be thrown in Real mode), and of course it's a complex number for complex values. log( is not defined at 0, even if you're in a complex mode.

Advanced Uses

Using either the Ln( or the log( command, logarithms of any base can be calculated, using the identity: <math> \log_b{x} = \frac{\ln{x}}{\ln{b}} = \frac{\log{x}}{\log{b}} </math>

So, to take the base B log of a number X, you could use either of the following equivalent ways:

:log(X)/log(B)
:ln(X)/ln(B)

This is the exponent to which B must be raised, to get X.

The base 10 logarithm specifically can be used to calculate the number of digits a whole number has:


:1+int(log(N))


This will return the number of digits N has, if N is a whole number. If N is a decimal, it will ignore the decimal digits of N.

Error Conditions

Related Commands